nfp: support IPsec offloading for NFP3800
authorHuanhuan Wang <huanhuan.wang@corigine.com>
Wed, 8 Feb 2023 09:10:00 +0000 (10:10 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Feb 2023 06:22:19 +0000 (22:22 -0800)
commit436396f26d502ada54281958db0a9f6fc12ff256
tree5944c841be02b70128ca2d2fe12fc5cae4e12b00
parent2894d3530948acd30f2cc5366728a6967fc6569f
nfp: support IPsec offloading for NFP3800

Add IPsec offloading support for NFP3800. Include data
plane and control plane.

Data plane: add IPsec packet process flow in NFP3800
datapath (NFDk).

Control plane: add an algorithm support distinction flow
in xfrm hook function xdo_dev_state_add(), as NFP3800 has
a different set of IPsec algorithm support.

This matches existing support for the NFP6000/NFP4000 and
their NFD3 datapath.

In addition, fixup the md_bytes calculation for NFD3 datapath
to make sure the two datapahts are keept in sync.

Signed-off-by: Huanhuan Wang <huanhuan.wang@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230208091000.4139974-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/Makefile
drivers/net/ethernet/netronome/nfp/crypto/ipsec.c
drivers/net/ethernet/netronome/nfp/nfd3/dp.c
drivers/net/ethernet/netronome/nfp/nfdk/dp.c
drivers/net/ethernet/netronome/nfp/nfdk/ipsec.c [new file with mode: 0644]
drivers/net/ethernet/netronome/nfp/nfdk/nfdk.h