[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f2c52a01-925c-4e3a-8a42-aeb809364cc9@6wind.com>
Date: Wed, 10 Apr 2024 09:35:08 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: antony.antony@...unet.com, Steffen Klassert
<steffen.klassert@...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>
Subject: Re: [PATCH ipsec-next v9] xfrm: Add Direction to the SA in or out
Le 10/04/2024 à 09:26, Sabrina Dubroca a écrit :
> 2024-04-10, 08:32:20 +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.
>> Please, don't drop this check.
>
> Limiting XFRMA_SA_DIR to only HW offload makes no sense. It's
> completely redundant with an existing property. We should also try to
> limit the divergence between offload and non-offload configuration. If
Sure.
> something is clearly only for offloaded configs, then fine, but
> otherwise the APIs should be identical.
But right now, the property is enforced for offload and but not for non-offload.
In that sense, the api is not identical. I'm only asking to make this explicit.
>
> And based on what Antony says, this is intended in large part for
> IPTFS, which is not going to be offloaded any time soon (or probably
> ever), so that restriction would have to be lifted immediately. I'm
> not sure why Antony accepted your request.
I don't see the problem with that. The attribute can be relaxed later for IPTFS
if needed.
But there are use cases without offload and without IPTFS.
Why isn't it possible to restrict the use of an input SA to the input path and
output SA to xmit path?
Regards,
Nicolas
Powered by blists - more mailing lists