[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y2tkJjdLLSWyTO3l@unreal>
Date: Wed, 9 Nov 2022 10:26:14 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Yinjun Zhang <yinjun.zhang@...igine.com>
Cc: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Steffen Klassert <steffen.klassert@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Chengtian Liu <chengtian.liu@...igine.com>,
HuanHuan Wang <huanhuan.wang@...igine.com>,
Louis Peens <louis.peens@...igine.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
oss-drivers <oss-drivers@...igine.com>,
Simon Horman <simon.horman@...igine.com>
Subject: Re: [PATCH net-next v3 3/3] nfp: implement xfrm callbacks and expose
ipsec offload feature to upper layer
On Wed, Nov 09, 2022 at 06:58:44AM +0000, Yinjun Zhang wrote:
> On Mon, 7 Nov 2022 08:14:12 +0200, Leon Romanovsky wrote:
> > On Tue, Nov 01, 2022 at 12:02:48PM +0100, Simon Horman 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;
> > > + default:
> > > + nn_err(nn, "Unsupported mode for xfrm offload\n");
> >
> > There are no other modes.
>
> Sorry this comment was neglected, but I have to say this is a good practice to avoid
> newly introduced mode in future sneaking into HW while it's not supported.
There is a subtitle difference between not-existent flows and
not-supported ones. Good practice is to rely on upper level API to do
the right thing from the beginning.
Thanks
Powered by blists - more mailing lists