Re: [PATCH net-next v4 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X

From: Andrea Mayer

Date: Tue Nov 24 2026 - 22:17:04 EST


On Tue, 24 Nov 2026 13:47:29 +0800
Hangbin Liu <hangbin.liu@xxxxxxxxx> wrote:

Hi Hangbin,
thanks for looking further into it.

> [snip]
>
> (i.a) hs-1 -> hs-2: on the packets with DA=fcff:3::400a, rt-1 inserts the
> extra SRH with SID List=fcff:4::e,fcff:3::400a, and rt-4 consumes it.
> Path: hs-1 -> rt-1 [ -> rt-4 ] -> rt-3 -> rt-4 -> rt-2 -> hs-2
> (i.b) hs-2 -> hs-1: on the packets with DA=fcff:1::0af1, rt-2 inserts the
> extra SRH with SID List=fcff:3::e,fcff:1::0af1, and rt-3 consumes it.
> Path: hs-2 -> rt-2 [ -> rt-3 ] -> rt-1 -> hs-1
> (i.c) hs-1 -> hs-2: on the packets with DA=fcbb:0:34a9::, rt-1 inserts the
> extra SRH with SID List=fcff:4::e,fcbb:0:34a9::, and rt-4 consumes it.
> Path: hs-1 -> rt-1 [ -> rt-4 ] -> rt-3 -> rt-4 -> rt-2 -> hs-2
> (i.d) hs-2 -> hs-1: on the packets with DA=fcbb:0:43a9:31a9:10a9::, rt-2
> inserts the extra SRH with SID List=fcff:3::e,fcbb:0:43a9:31a9:10a9::,
> and rt-3 consumes it.
> Path: hs-2 -> rt-2 [ -> rt-3 ] -> rt-4 -> rt-3 -> rt-1 -> hs-1
>
> Ah, add unreach rt-4 SID (fcbb:0:4000::/36) on rt-3 will break the path for (1.d)
> testing, as we use End action on rt-3 and redirect via the route. Can we just
> add the unreach route (fcff:4::/32) on rt-3 for (1.a) ?

Right, an unreachable /36 in place of the underlay route breaks the
consumed SRH test of (i.d). The exact route for the (i.c) container
fcbb:0:42a9:20a9:: on rt-3 does not, as the End there looks up
fcbb:0:43a9:31a9:10a9::.

A route on rt-3 for (i.a) is a good idea. It checks the End.X 3>4
without flavors, which the routes on rt-4 for (i.a) and on rt-3 for
(i.c) do not check.

On rt-3, fcff:4::/32 is already in table 90, as the underlay route via
rt-4. Adding the unreachable one gives "RTNETLINK answers: File exists",
and with "ip route replace" it takes the place of the underlay route.
For (i.a) on rt-3, I would add an unreachable route only for
fcff:4::2af1, the SID after End.X 3>4. The underlay route stays as it
is, and the defer only has to delete the new route. I added it to the
routes in my other reply.

I would keep the route on rt-4 too. With your /32 on rt-3, put in with
"ip route replace", and without the route on rt-4, all the tests pass
when only the End.X 4>2 with PSP works as End.

Ciao,
Andrea