Thread (14 messages) 14 messages, 3 authors, 3d ago

Re: [PATCH net-next 5/5] selftests: seg6: add End.X PSP selftest

From: Hangbin Liu <hidden>
Date: 2026-09-23 01:48:17
Also in: linux-kselftest, lkml

On Tue, Sep 22, 2026 at 04:54:47PM +0800, Hangbin Liu wrote:
quoted hunk ↗ jump to hunk
From: Hangbin Liu <redacted>

The current selftest only exercises End with PSP. Add a new test that
uses End.X on the PSP path so the kernel's End.X flavor handling is
validated end to end.

Extend __setup_rt_policy() to parse End.X action field from the
router description, allowing entries like:
  4:psp:End.X,4,2
  3:psp:End.X,3,1

Since SETUP_ERR is not set in one setup function, and the middle test may
set ret to 1, we also need to check ret before setting the result as SKIP.

Signed-off-by: Hangbin Liu <redacted>
---
 .../testing/selftests/net/srv6_end_flavors_test.sh | 83 ++++++++++++++++++++--
 1 file changed, 78 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/srv6_end_flavors_test.sh b/tools/testing/selftests/net/srv6_end_flavors_test.sh
index 52731983b4cc..e130d0d71b3d 100755
--- a/tools/testing/selftests/net/srv6_end_flavors_test.sh
+++ b/tools/testing/selftests/net/srv6_end_flavors_test.sh
[...]
 
+setup_endx_flv_psp()
+{
+	# Direction hs-1 -> hs-2 (End.X PSP flavor)
+	# SID List=fcff:3::e,fcff:4::ef1,cafe::2
+	#  - rt-1 (SRv6 H.Insert policy)
+	#  - rt-3 (SRv6 End behavior)
+	#  - rt-4 (SRv6 End.X flavor PSP with SL=1)
+	#  - rt-2 (Route to hs-2 via nh and oif)
Oh, just noticed that I made a mistake comment. It should be

	#  - rt-4 (SRv6 End.X flavor PSP with SL=1, route to rt-2 via nh and oif)
	#  - rt-2 (Route to hs-2 with same subnet)
+	#
+	# Direction hs-2 -> hs-1 (End.X PSP flavor)
+	# SID List=fcff:3::ef1,cafe::1
+	#  - rt-2 (SRv6 H.Insert policy)
+	#  - rt-3 (SRv6 End.X flavor PSP with SL=1)
+	#  - rt-1 (Route to hs-1 via nh and oif)
Same here.
+	setup_rt_policy_ipv6 2 1 "3:noflv:End 4:psp:End.X,4,2"
+	setup_rt_policy_ipv6 1 2 "3:psp:End.X,3,1"
Thanks
Hangbin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help