From: Sabrina Dubroca <sd@queasysnail.net>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: antony.antony@secunet.com,
Steffen Klassert <steffen.klassert@secunet.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
devel@linux-ipsec.org, Leon Romanovsky <leon@kernel.org>,
Eyal Birger <eyal.birger@gmail.com>
Subject: Re: [PATCH ipsec-next v9] xfrm: Add Direction to the SA in or out
Date: Wed, 10 Apr 2024 10:17:32 +0200 [thread overview]
Message-ID: <ZhZLHNS41G2AJpE_@hog> (raw)
In-Reply-To: <f2c52a01-925c-4e3a-8a42-aeb809364cc9@6wind.com>
2024-04-10, 09:35:08 +0200, Nicolas Dichtel wrote:
> 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 :
> >>> 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.
We can't get rid of the offload-specific way of setting the direction,
because it's a flag (off = out, on = in), but if we add another way of
setting the direction, it should be for all cases (we already have one
for offload, we don't need a 2nd offload-specific flag), and it should
correctly lock down uses (incompatible options, and use of the SA in
the datapath as you said).
> > 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.
Then we would have landed back on v4 (unless we add the checks we're
discussing now)...
> But there are use cases without offload and without IPTFS.
Sure. That's probably the vast majority of IPsec users.
> Why isn't it possible to restrict the use of an input SA to the input path and
> output SA to xmit path?
Because nobody has written a patch for it yet :)
--
Sabrina
next prev parent reply other threads:[~2024-04-10 8:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 17:56 [PATCH ipsec-next v9] xfrm: Add Direction to the SA in or out Antony Antony
2024-04-10 6:32 ` Nicolas Dichtel
2024-04-10 7:26 ` Sabrina Dubroca
2024-04-10 7:35 ` Nicolas Dichtel
2024-04-10 8:17 ` Sabrina Dubroca [this message]
2024-04-10 8:37 ` Nicolas Dichtel
2024-04-10 8:57 ` Sabrina Dubroca
2024-04-10 13:52 ` [devel-ipsec] " Paul Wouters
2024-04-11 7:23 ` Steffen Klassert
2024-04-11 7:22 ` Steffen Klassert
2024-04-11 9:05 ` Nicolas Dichtel
2024-04-11 9:31 ` Steffen Klassert
2024-04-11 7:14 ` Steffen Klassert
2024-04-11 9:01 ` Nicolas Dichtel
2024-04-11 9:04 ` Steffen Klassert
2024-04-11 9:36 ` Antony Antony
2024-04-11 9:35 ` 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=ZhZLHNS41G2AJpE_@hog \
--to=sd@queasysnail.net \
--cc=antony.antony@secunet.com \
--cc=davem@davemloft.net \
--cc=devel@linux-ipsec.org \
--cc=edumazet@google.com \
--cc=eyal.birger@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.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).