Subject: Re: [PATCH net-next v3 3/3] nfp: implement xfrm callbacks and expose ipsec offload feature to upper layer

From: Leon Romanovsky <[email-masked]>
Date: Tue, 8 Nov 2022 20:42:59 +0200

On Tue, Nov 08, 2022 at 01:28:20AM +0000, Yinjun Zhang wrote:
> On Mon, 7 Nov 2022 14:40:53 +0200, Leon Romanovsky wrote:
> > On Mon, Nov 07, 2022 at 09:46:46AM +0000, Yinjun Zhang wrote:
> > > On Mon, 7 Nov 2022 08:14:12 +0200, Leon Romanovsky wrote:
> > > <...>
> > > > > +
> > > > > +	/* General */
> > > > > +	switch (x->props.mode) {
> > > > > +	case XFRM_MODE_TUNNEL:
> > > > > +		cfg->ctrl_word.mode = NFP_IPSEC_PROTMODE_TUNNEL;
> > > > > +		break;
> > > > > +	case XFRM_MODE_TRANSPORT:
> > > > > +		cfg->ctrl_word.mode = NFP_IPSEC_PROTMODE_TRANSPORT;
> > > > > +		break;
> > > >
> > > > Why is it important for IPsec crypto? The HW logic must be the same for
> > > > all modes. There are no differences between transport and tunnel.
> > >
> > > As I mentioned above, it's differentiated in HW to support more features.
> > 
> > You are adding crypto offload, so please don't try to sneak "more" features.
> > 
> 
> No sneaking, just have to conform to the design of HW, so that things are not
> messed up.

So what is the answer to my question above "Why is it important for IPsec crypto?"?

Thanks