nfp: fix schedule in atomic context when offloading sa
authorYinjun Zhang <yinjun.zhang@corigine.com>
Wed, 8 Feb 2023 10:22:58 +0000 (11:22 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Feb 2023 06:28:06 +0000 (22:28 -0800)
commit71f814cda659dca3db575ed67dfcdc4b93e8d33f
tree27d981d4b9f1f17a76f2fa149119cbebf4721105
parent7a13a2eef645f2d2e3018d6ea518f121b35a87c8
nfp: fix schedule in atomic context when offloading sa

IPsec offloading callbacks may be called in atomic context, sleep is
not allowed in the implementation. Now use workqueue mechanism to
avoid this issue.

Extend existing workqueue mechanism for multicast configuration only
to universal use, so that all configuring through mailbox asynchronously
can utilize it.

Fixes: 859a497fe80c ("nfp: implement xfrm callbacks and expose ipsec offload feature to upper layer")
Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/crypto/ipsec.c
drivers/net/ethernet/netronome/nfp/nfp_net.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c