From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Eyal Birger <eyal.birger@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, steffen.klassert@secunet.com,
herbert@gondor.apana.org.au, pablo@netfilter.org,
contact@proelbtn.com, dsahern@kernel.org, netdev@vger.kernel.org,
bpf@vger.kernel.org, devel@linux-ipsec.org
Subject: Re: [PATCH ipsec-next 3/3] xfrm: lwtunnel: add lwtunnel support for xfrm interfaces in collect_md mode
Date: Thu, 25 Aug 2022 12:07:54 +0200 [thread overview]
Message-ID: <0e44ad3b-e1a0-6af4-5e8f-f808d3b28715@6wind.com> (raw)
In-Reply-To: <CAHsH6Gv0AaNamsumhdqVtuTCMkJCwcAam07kZZoQ0vbuZi7tHA@mail.gmail.com>
Le 24/08/2022 à 20:56, Eyal Birger a écrit :
> Hi Nicolas,
>
> On Wed, Aug 24, 2022 at 6:21 PM Nicolas Dichtel
> <nicolas.dichtel@6wind.com> wrote:
>>
>>
>> Le 23/08/2022 à 17:45, Eyal Birger a écrit :
>>> Allow specifying the xfrm interface if_id as part of a route metadata
>>> using the lwtunnel infrastructure.
>>>
>>> This allows for example using a single xfrm interface in collect_md
>>> mode as the target of multiple routes each specifying a different if_id.
>>>
>>> With the appropriate changes to iproute2, considering an xfrm device
>>> ipsec1 in collect_md mode one can for example add a route specifying
>>> an if_id like so:
>>>
>>> ip route add <SUBNET> dev ipsec1 encap xfrm if_id 1
>> It would be nice to be able to specify the link also. It may help to combine
>> this with vrf. Something like
>> ip route add <SUBNET> dev ipsec1 encap xfrm if_id 1 dev eth0
>
> I think I understand how this would work on xmit - if you mean adding link
> to the metadata and using it to set fl.flowi_oif in xfrmi_xmit() - in which
> case the link would be used in the underlying lookup such that routes in
> a vrf could specify a device which is part of the vrf for egress.
Yes.
>
> On RX we could assign the link in the metadata in xfrmi_rcv_cb() to the original
> skb->dev. I suspect this would be aligned with the link device, but any input
> you may have on this would be useful.
The link is not used in the rx path, only in the tx path to perform the route
lookup in the right vrf. You can assign the input iface to the link device, but
the if_id should be enough to identify the tunnel.
Thank you,
Nicolas
next prev parent reply other threads:[~2022-08-25 10:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 15:45 [PATCH ipsec-next 0/3] xfrm: support collect metadata mode for xfrm interfaces Eyal Birger
2022-08-23 15:45 ` [PATCH ipsec-next 1/3] net: allow storing xfrm interface metadata in metadata_dst Eyal Birger
2022-08-23 15:45 ` [PATCH ipsec-next 2/3] xfrm: interface: support collect metadata mode Eyal Birger
2022-08-24 17:06 ` Daniel Borkmann
2022-08-24 18:25 ` Eyal Birger
2022-08-24 21:33 ` Daniel Borkmann
2022-08-23 15:45 ` [PATCH ipsec-next 3/3] xfrm: lwtunnel: add lwtunnel support for xfrm interfaces in collect_md mode Eyal Birger
2022-08-24 15:21 ` Nicolas Dichtel
2022-08-24 18:56 ` Eyal Birger
2022-08-25 10:07 ` Nicolas Dichtel [this message]
2022-08-25 13:03 ` Eyal Birger
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=0e44ad3b-e1a0-6af4-5e8f-f808d3b28715@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=bpf@vger.kernel.org \
--cc=contact@proelbtn.com \
--cc=davem@davemloft.net \
--cc=devel@linux-ipsec.org \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=eyal.birger@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--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