From: David Ahern <dsahern@kernel.org>
To: Andrea Mayer <andrea.mayer@uniroma2.it>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
Nicolas Dichtel <nicolas.dichtel@6wind.com>,
Justin Iurman <justin.iurman@6wind.com>,
Anthony Doeraene <anthony.doeraene@uclouvain.be>,
Stefano Salsano <stefano.salsano@uniroma2.it>,
Ahmed Abdelsalam <ahabdels@cisco.com>,
Paolo Lungaroni <paolo.lungaroni@uniroma2.it>,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] seg6: add FIB table attribute for post-encap SID route lookup
Date: Sat, 11 Jul 2026 11:04:01 -0600 [thread overview]
Message-ID: <b1df9a9b-e419-4acd-9be0-90fbf4fa5945@kernel.org> (raw)
In-Reply-To: <20260711162907.6521-2-andrea.mayer@uniroma2.it>
On 7/11/26 10:29 AM, Andrea Mayer wrote:
> After SRv6 encapsulation the kernel looks up the route for the first SID,
> that is the outer IPv6 destination of the encapsulated packet. This
> post-encap SID route lookup uses the FIB table of the current routing
> context. When the encap route is installed in a VRF, the VRF's table may
> not have a route matching the SID. In that case another table should
> handle it, e.g. one configured for underlay connectivity.
>
> Add an optional SEG6_IPTUNNEL_TABLE attribute that selects the FIB table
> used for this lookup. When set by the user, the attribute is honored on
> both the input path (forwarded traffic) and the output path (locally
> originated traffic). SRv6 encap routes that do not set the attribute use
> the current routing context, as before.
>
> For example:
>
> # SID route installed in the underlay table 500
> ip -6 route add fc00::100/128 via fd00::1 dev veth0 table 500
>
> # encap route in vrf-100; the first SID is looked up in table 500
> ip -6 route add cafe::1/128 vrf vrf-100 \
> encap seg6 mode encap segs fc00::100 lookup 500 dev veth0
>
> # or look up the SID in the main table
> ip -6 route add cafe::1/128 vrf vrf-100 \
> encap seg6 mode encap segs fc00::100 lookup main dev veth0
>
> Suggested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
> Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> include/uapi/linux/seg6_iptunnel.h | 1 +
> net/ipv6/seg6_iptunnel.c | 132 +++++++++++++++++++++++++----
> 2 files changed, 117 insertions(+), 16 deletions(-)
>
Acked-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2026-07-11 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 16:29 [PATCH net-next 0/2] seg6: add FIB table attribute for post-encap SID route lookup Andrea Mayer
2026-07-11 16:29 ` [PATCH net-next 1/2] " Andrea Mayer
2026-07-11 17:04 ` David Ahern [this message]
2026-07-11 16:29 ` [PATCH net-next 2/2] selftests: seg6: add test " Andrea Mayer
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=b1df9a9b-e419-4acd-9be0-90fbf4fa5945@kernel.org \
--to=dsahern@kernel.org \
--cc=ahabdels@cisco.com \
--cc=andrea.mayer@uniroma2.it \
--cc=anthony.doeraene@uclouvain.be \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=justin.iurman@6wind.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=paolo.lungaroni@uniroma2.it \
--cc=shuah@kernel.org \
--cc=stefano.salsano@uniroma2.it \
/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