Re: [PATCH net-next v3 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X
From: Hangbin Liu
Date: Tue Nov 17 2026 - 19:51:44 EST
On Tue, Nov 17, 2026 at 04:48:12PM +0800, Hangbin Liu wrote:
> > > I didn't add `host_srv6_end_flv_consumed_srh_tests()` for End.X because
> > > the extra policy insertion does not work with the End.X policy. The packet
> > > resolves the destination via the next hop directly, rather than doing a
> > > re-lookup in table 90.
> >
> > The ingress router can insert the extra SRH instead, on the first SID
> > of the Policy. As in the End tests, an End SID of the base setup can
> > then consume it. This way, we can add these tests for End.X too. What
> > do you think?
>
> For the End.X Policy (i.a) testing, we have SID List=fcff:3::a,fcff:4::af1,fcff:2::af1,cafe::2.
> And we configured the next hop policy for the SID on each rt. e.g
>
> On rt3: fcff:3::000a table 90 encap seg6local action End.X nh6 fcf0:0:3:4::4
> On rt4: fcff:4::0af1 table 90 encap seg6local action End.X nh6 fcf0:0:2:4::2 flavors psp
> on rt2: fcff:2::0af1 table 90 encap seg6local action End.X nh6 cafe::2 flavors psp
>
> When the packet arrive on rt4, it's dst is set to fcff:2::af1. And the new
> insert policy (fcff:2::0af1 table 90 encap seg6 mode inline segs fcff:3::000e dev dum0)
> doesn't works as the End.X policy will goto next hop fcf0:0:2:4::2 directly
> instead of looking at fcff:2::af1 on table 90.
>
hmm, Not sure if you mean to add a ip rule for the ingress route? e.g.
# ip rule add from cafe::1 to fcff:4::af1 lookup 100
# ip route add fcff:4::af1 table 100 encap seg6 mode inline segs fcff:3::000e, dev dum0
Then on rt3, we got
IPv6 DA=fcff:3::e | extra SRH, SL=1 | Policy's SRH, SL=2 | Payload
after action End, rt3 send
IPv6 DA=fcff:4::af1 | extra SRH, SL=0 | Policy's SRH, SL=2 | Payload
But here the fcff:4::af1 will hit the ip rule and do encap again, which will
be a loop.
Do I missed something?
Hangbin