nfp: fix incorrect use of mbox in IPsec code
authorYinjun Zhang <yinjun.zhang@corigine.com>
Wed, 8 Feb 2023 10:22:57 +0000 (11:22 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Feb 2023 06:28:06 +0000 (22:28 -0800)
commit7a13a2eef645f2d2e3018d6ea518f121b35a87c8
tree68a2bc3395426bd46639cccc5a1ceb985468b7c6
parentd61615c366a489646a1bfe5b33455f916762d5f4
nfp: fix incorrect use of mbox in IPsec code

The mailbox configuration mechanism requires writing several registers,
which shouldn't be interrupted, so need lock to avoid race condition.

The base offset of mailbox configuration registers is not fixed, it
depends on TLV caps read from application firmware.

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_ctrl.h