mbox series

[net-next,v3,0/3] nfp: IPsec offload support

Message ID 20221101110248.423966-1-simon.horman@corigine.com (mailing list archive)
Headers show
Series nfp: IPsec offload support | expand

Message

Simon Horman Nov. 1, 2022, 11:02 a.m. UTC
Huanhuan Wang says:

this short series is support IPsec offload for the NFP driver.

It covers three enhancements:

1. Patches 1/3:
   - Extend the capability word and control word to to support
     new features.

2. Patch 2/3:
   - Add framework to support IPsec offloading for NFP driver,
     but IPsec offload control plane interface xfrm callbacks which
     interact with upper layer are not implemented in this patch.

3. Patch 3/3:
   - IPsec control plane interface xfrm callbacks are implemented
     in this patch.

Changes since v2
* OFFLOAD_HANDLE_ERROR macro and the associated code removed
* Unnecessary logging removed
* Hook function xdo_dev_state_free in struct xfrmdev_ops removed
* Use Xarray to maintain SA entries

Changes since v1
* Explicitly return failure when XFRM_STATE_ESN is set
* Fix the issue that AEAD algorithm is not correctly offloaded

Huanhuan Wang (2):
  nfp: add framework to support ipsec offloading
  nfp: implement xfrm callbacks and expose ipsec offload feature to
    upper layer

Yinjun Zhang (1):
  nfp: extend capability and control words

 drivers/net/ethernet/netronome/Kconfig        |  11 +
 drivers/net/ethernet/netronome/nfp/Makefile   |   2 +
 .../ethernet/netronome/nfp/crypto/crypto.h    |  23 +
 .../net/ethernet/netronome/nfp/crypto/ipsec.c | 633 ++++++++++++++++++
 drivers/net/ethernet/netronome/nfp/nfd3/dp.c  |  58 +-
 .../net/ethernet/netronome/nfp/nfd3/ipsec.c   |  18 +
 .../net/ethernet/netronome/nfp/nfd3/nfd3.h    |   8 +
 drivers/net/ethernet/netronome/nfp/nfp_net.h  |  11 +
 .../ethernet/netronome/nfp/nfp_net_common.c   |  10 +
 .../net/ethernet/netronome/nfp/nfp_net_ctrl.h |  22 +-
 10 files changed, 781 insertions(+), 15 deletions(-)
 create mode 100644 drivers/net/ethernet/netronome/nfp/crypto/ipsec.c
 create mode 100644 drivers/net/ethernet/netronome/nfp/nfd3/ipsec.c

Comments

Jakub Kicinski Nov. 4, 2022, 3:48 a.m. UTC | #1
On Tue,  1 Nov 2022 12:02:45 +0100 Simon Horman wrote:
> It covers three enhancements:
> 
> 1. Patches 1/3:
>    - Extend the capability word and control word to to support
>      new features.
> 
> 2. Patch 2/3:
>    - Add framework to support IPsec offloading for NFP driver,
>      but IPsec offload control plane interface xfrm callbacks which
>      interact with upper layer are not implemented in this patch.
> 
> 3. Patch 3/3:
>    - IPsec control plane interface xfrm callbacks are implemented
>      in this patch.

Steffen, Leon, does this look good to you?
Steffen Klassert Nov. 5, 2022, 3:27 p.m. UTC | #2
On Thu, Nov 03, 2022 at 08:48:00PM -0700, Jakub Kicinski wrote:
> On Tue,  1 Nov 2022 12:02:45 +0100 Simon Horman wrote:
> > It covers three enhancements:
> > 
> > 1. Patches 1/3:
> >    - Extend the capability word and control word to to support
> >      new features.
> > 
> > 2. Patch 2/3:
> >    - Add framework to support IPsec offloading for NFP driver,
> >      but IPsec offload control plane interface xfrm callbacks which
> >      interact with upper layer are not implemented in this patch.
> > 
> > 3. Patch 3/3:
> >    - IPsec control plane interface xfrm callbacks are implemented
> >      in this patch.
> 
> Steffen, Leon, does this look good to you?

The xfrm offload API is used correct, but can't speak
for the driver code.

For the xfrm API related part:

Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Leon Romanovsky Nov. 5, 2022, 5:25 p.m. UTC | #3
On Fri, Nov 4, 2022, at 05:48, Jakub Kicinski wrote:
> On Tue,  1 Nov 2022 12:02:45 +0100 Simon Horman wrote:
>> It covers three enhancements:
>> 
>> 1. Patches 1/3:
>>    - Extend the capability word and control word to to support
>>      new features.
>> 
>> 2. Patch 2/3:
>>    - Add framework to support IPsec offloading for NFP driver,
>>      but IPsec offload control plane interface xfrm callbacks which
>>      interact with upper layer are not implemented in this patch.
>> 
>> 3. Patch 3/3:
>>    - IPsec control plane interface xfrm callbacks are implemented
>>      in this patch.
>
> Steffen, Leon, does this look good to you

I'm sorry but didn't look yet. We had onsite IPsec workshop at that time.  I'll take look on Sunday.

Thanks