netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antony Antony <antony@phenome.org>
To: nicolas.dichtel@6wind.com
Cc: antony.antony@secunet.com,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	devel@linux-ipsec.org, netdev@vger.kernel.org
Subject: [PATCH ipsec-next v4] xfrm: Add Direction to the SA in or out
Date: Sun, 17 Mar 2024 23:34:25 +0100	[thread overview]
Message-ID: <Zfdv8dLMhpwItqGL@Antony2201.local> (raw)
In-Reply-To: <c2b3203b-fcc7-452f-88d8-1ef826509915@6wind.com>

Hi Nicolas,

On Thu, Mar 14, 2024 at 03:28:57PM +0100, Nicolas Dichtel via Devel wrote:
> Le 13/03/2024 à 22:04, Antony Antony via Devel 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.
> 
> If I correctly understand the commit, the direction is ignored if there is no
> offload configured, ie an output SA could be used in input. Am I right?
> 
> If yes:
>  1/ it would be nice to state it explicitly in the commit log.
>  2/ it is confusing for users not using offload.


I see why you're asking for clarification. This patch is designed for 
broader use in the future beyond its current application, specifically for 
the HW offload use case. Notably, the upcoming IP-TFS patch, among others, 
will utilize the 'direction' (dir) attribute. The absence of a 'direction' 
for an SA can lead to a confusing user experience. While symmetry is nice, 
configuring values that are not utilized and are direction-specific can be 
very confusing. For instance, many users configure a replay window 
(specifically without ESN) on an outbound SA, even though the replay window 
is only applicable to an inbound SA. With ESN, you can just leave it at 1.  
SAs have historically lacked a direction attribute. It has been brought up 
many times but never implemented.

Following the email I shared earlier 
(https://lore.kernel.org/netdev/ZV0BSBzNh3UIqueZ@Antony2201.local/), I 
discussed this proposal with more users/developers, and there is interest in 
adding a direction to SA for future values. Maybe I will addd one line in 
the message this is in preperartion for upcoming IP-TFS.

-antony

  reply	other threads:[~2024-03-17 22:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13 21:04 [PATCH ipsec-next v4] xfrm: Add Direction to the SA in or out Antony Antony
2024-03-14 12:27 ` Leon Romanovsky
2024-03-14 14:28 ` [devel-ipsec] " Nicolas Dichtel
2024-03-17 22:34   ` Antony Antony [this message]
2024-03-22  8:20     ` Nicolas Dichtel
2024-04-04  8:38       ` Antony Antony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zfdv8dLMhpwItqGL@Antony2201.local \
    --to=antony@phenome.org \
    --cc=antony.antony@secunet.com \
    --cc=devel@linux-ipsec.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).