[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zheu1lOc6KalNUFt@moon.secunet.de>
Date: Thu, 11 Apr 2024 11:35:18 +0200
From: Antony Antony <antony.antony@...unet.com>
To: Steffen Klassert <steffen.klassert@...unet.com>
CC: Nicolas Dichtel <nicolas.dichtel@...nd.com>, <antony.antony@...unet.com>,
Herbert Xu <herbert@...dor.apana.org.au>, <netdev@...r.kernel.org>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
<devel@...ux-ipsec.org>, Leon Romanovsky <leon@...nel.org>, Eyal Birger
<eyal.birger@...il.com>, Sabrina Dubroca <sd@...asysnail.net>
Subject: Re: [PATCH ipsec-next v9] xfrm: Add Direction to the SA in or out
On Thu, Apr 11, 2024 at 09:14:15 +0200, Steffen Klassert wrote:
> On Wed, Apr 10, 2024 at 08:32:20AM +0200, Nicolas Dichtel wrote:
> > Le 09/04/2024 à 19:56, Antony Antony a écrit :
> > > This patch introduces the 'dir' attribute, 'in' or 'out', to the
> > > xfrm_state, SA, enhancing usability by delineating the scope of values
> > > based on direction. An input SA will now exclusively encompass values
> > > pertinent to input, effectively segregating them from output-related
> > > values. This change aims to streamline the configuration process and
> > > improve the overall clarity of SA attributes.
> > >
> > > This feature sets the groundwork for future patches, including
> > > the upcoming IP-TFS patch.
> > >
> > > Signed-off-by: Antony Antony <antony.antony@...unet.com>
> > > ---
> > > v8->v9:
> > > - add validation XFRM_STATE_ICMP not allowed on OUT SA.
> > >
> > > v7->v8:
> > > - add extra validation check on replay window and seq
> > > - XFRM_MSG_UPDSA old and new SA should match "dir"
> > >
> > > v6->v7:
> > > - add replay-window check non-esn 0 and ESN 1.
> > > - remove :XFRMA_SA_DIR only allowed with HW OFFLOAD
> > Why? I still think that having an 'input' SA used in the output path is wrong
> > and confusing.
>
> I don't think this can happen. This patch does not change the
> state lookups, so we should match the correct state as it was
> before that patch.
>
> On the long run, we should make the direction a lookup key.
> That should have happened with the initial implemenatation
> already, now ~25 years later we would have to maintain the
> old input/output combined SADB and two new ones where input
> and output states are separated.
>
+1
Talking about the history, the need for SA "dir" is long overdue.
My issue is when offload was added they aded a new direction flag
which is specific to off-load only. And now we want one for IP-TFS.
Trying to restrict dir only to IP-TFS sounds bad idea. That is why I
pushing for an information only SA "dir", and it not for look up at the
moment.
Any case, I will send v10, please wait. I think that address most
concerns. We just have to polish the checks and error counter there.
-antony
Powered by blists - more mailing lists