🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22909

[PATCH net-next v5 0/5] seg6: add End.X PSP flavor support and selftests

#22909
From: Hangbin Liu
Date: Thu, 26 Nov 2026 06:27
80 lines
11692 bytes
This series adds End.X PSP flavor handling in seg6local and extends the
SRv6 selftests to cover it.

Patch 1 splits the final forwarding step out of end_flv8986_core() so
RFC8986 flavor logic can be reused outside the End path.

Patch 2 uses that to add End.X PSP support through the same
end_flv8986_core() path.

Patches 3-4 refactor the PSP selftest setup/cleanup so flavor tests can
be added more cleanly.

Patch 5 adds End.X PSP connectivity coverage and updates the selftest
policy parser to accept an explicit action field.

The goal is to make End.X PSP behavior consistent with End PSP, while
keeping the selftest structure easier to extend for later flavors.

Run all srv6 selftests on debug kernel. All passed without error.

Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
---
Changes in v5:
- various fixes and updates on patch 5, suggested by Andrea Mayer.
- Link to v4: https://patch.msgid.link/20261119-srv6_flavors_endx-v4-0-284cdb484eee@kylinos.cn

Changes in v4:
- Thanks for Andrea' reviewing. All the changes are based on Andrea's suggestion
- Patch 3:
  - always report on every setup error
  - keep adding proxy entry __setup_rt_policy
- Patch 4:
  - update commit subject and description
  - defer proxy route
  - defer setup_hs_lo_addr
- Patch 5:
  - add helper __get_srv6_node_id() and __get_srv6_adjacent_id to get
    node id and adjacent id. Remove __get_srv6_rtcfg_all_id.
  - merge three __get_*_func() to one __get_func() helper
  - update build_csid() to use the 2 new add helper
  - __setup_rt_policy
    - add a check to drop incorrect policy
    - use get_rt_sid() to get the policy
    - read the element once, and pass only what setup_rt_endpoints() needs
  - add a check of the kernel support for End.X PSP.
  - add a own SID for each adjacency
  - add consumed SRH testing for End.X
- Link to v3: https://patch.msgid.link/20261112-srv6_flavors_endx-v3-0-c9177bbbd965@kylinos.cn

Changes in v3:
- Rebase on Andrea's "seg6: fixes for the PSP flavor of SRv6 End"
- Update selftest to support the new SID format
- Link to v2: https://lore.kernel.org/r/20261009-srv6_flavors_endx-v2-0-56ac7f838f41@kylinos.cn

Changes in v2:
- rebase on Andrea's "seg6: ensure packet data is writable before modifying SRH and IPv6 DA"
- Patch 2: Update end_flv8986_core() comment for End.X
- Patch 3: Move ret check in this patch
- Patch 4: Do not remove noflv route
- Link to v1: https://lore.kernel.org/r/20260922-srv6_flavors_endx-v1-0-4d01c05c47b7@kylinos.cn

---
Hangbin Liu (5):
      seg6: split final End process out of flavor processing
      seg6: add RFC8986 flavor support for End.X
      selftests: seg6: move SRv6 End PSP setup into its own helper
      selftests: seg6: explicit cleanup for SRv6 End PSP test
      selftests: seg6: add PSP flavor testing for SRv6 End.X

 net/ipv6/seg6_local.c                              |  31 +-
 .../testing/selftests/net/srv6_end_flavors_test.sh | 614 +++++++++++++++++----
 2 files changed, 543 insertions(+), 102 deletions(-)
---
base-commit: 4cd558c2f1de7f1800f7d9065303ca5833cbad56
change-id: 20260922-srv6_flavors_endx-9489116d50c4

Best regards,
--  
Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID: <20261126-srv6_flavors_endx-v5-0-4d8232eec404@kylinos.cn>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371889-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371889-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v5 0/5] seg6: add End.X PSP flavor support and
 selftests
Date: Thu, 26 Nov 2026 14:27:22 +0800
Organization: Usenet Network
Message-ID: <20261126-srv6_flavors_endx-v5-0-4d8232eec404@kylinos.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="398141"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:c6UK2xiHk5e+7NJ5udflesK7bXo= sha256:U2HCDyulekfkHa+jYuGMT55T9FCTjO6tN5XA468hl08=
	sha1:fTimUBtPGaNNGb6ihf5sdmR3iGY= sha256:sOw6q4G4n7eYtsBAH7xb9tVGIkTDAqMbU+o7LK3+hGE=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 8ACA2125EB3; Thu, 26 Nov 2026 09:28:06 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.051
X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=linux.dev
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id SYxwxRbutrLq;
	Thu, 26 Nov 2026 09:28:01 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-371889-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 38CC2125EB0; Thu, 26 Nov 2026 09:27:52 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7AA9C409C8; Thu, 26 Nov 2026 06:27:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795674470;
	b=sR3ELL6wZyuXIxGHbdVPxwMOXyLtKE4uPMmsDvkD12pHj48BenmQu8xhLbhboA4Je8Cy
	 FfD0dQ975YsM6gX8rXk02HELUIjJHUqq05qi1OSMVH2y2CWr3ZMGIuk6wGWDle+D8yr0w
	 1IiE66NC9ONBPY6tpiq1xqrBBvr3neE9eqCK+TpfTUtcLoX8NB7zrbUnAPbphmw95NfPK
	 iIRJd5qDXcKzMh3c6WhIC2axkFSWJfu48agupJ/QV5CLEcZHWRgblNuTc6AYmK3jnEQwp
	 BeYxLaIEhWOBR9nkmOwb8RgrDEq4fMTr8ITLqQ8tU21+J2Z7BLgoJMFYqAouOEEel3g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795674470;
	h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature:
	 X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:Subject:
	 Date:Message-Id:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:
	 Cc:X-Mailer;
	bh=13XRomopXwt6Q1hpq9aDhpwOMkQtlN9+yFQSEusZX1Y=;
	b=WUsYktWMWf6a7WDr6E5R2mFnOV+smGsBtNrZQUmr6JV99X1YV85GsoaQUQJTui2eblfO
	 iFm/oKLxgcbvPsTwd9a+Bl/ZeQ7wuGU5NL74bqhKNHoGB2Ri625LcaH1DlbojgFs9vbkw
	 nuXIgD6F7w3QEpBdbuGGiRnnfqayo5s25MUHMtPfoYASd3T3tX51f/p20F9wohqKqVZmG
	 BJX5bm0kbVK3BMhmyBWLibU+VvKe1/R6h5Q70QnRIrGqFmYWORkynDFHv6ZKWTLSzAZOH
	 C2MUJ89dCeGS1jfRQhixJ0k5xa2LzwClCyr085SHD6Wla9BcKEdGZlV6L6srTc08zQQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=q2uzKyUW;
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id EB0E9606A335;
	Thu, 26 Nov 2026 06:27:49 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=q2uzKyUW
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795674465;
	b=AhLOd0KMJ8mC+XgmxVz+AtsmAO0cKHSxXbGzY9DaOpUMBYOuA5Xd/DqIYOyDHFfTld/M
	 yNtPcNAfK8TG/ddBirxwVxROC4k+uId4mjYVZlOfzKTcOs+GCXftcFllNFCWKecatJ3kb
	 g89oyrqo4hBAQj48keRu+hHlLJvTEjrJ7ORT63SPyfPs6fhRE3KJmuv31XiIw2cGP3xVm
	 nkWf400C2PhmNxTAFWKbWC+kHG7T5/hRr9I1o834uL3eAbcLIHVcZDngq4tK7gxH0eBpL
	 VV42vNJ1w/lp11eZOizaeOt+chjr9L7sLEswtVS1PZDWQcyO39Sd9r7d/ZUUPubv56w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795674465;
	h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received:
	 X-Mizu-Trace-ID:X-Migadu-Flow:From:Subject:Date:Message-Id:
	 MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking:
	 X-Change-ID:To:Cc:X-Mailer;
	bh=13XRomopXwt6Q1hpq9aDhpwOMkQtlN9+yFQSEusZX1Y=;
	b=WVzFsC8kEG5Fx9r1XJIgwLfueHQuLWSO5GOjJVqOHPHWcNZz24LRbNoVm5dvRtIbCVuW
	 BjGevZAqujjifXCjPulSscw8HfFZKDufXdE2yXZreyjNODaa4ezQB1GlMQd/QhvThjtnT
	 ns/DUXiZ7jgmcTHITEPmz1F/eIlOR4dCu9UaEj7BPOVPkGOC1po8oRX8+RcbtYQk9yKUk
	 EwTROaCf9Pxj28opLmn2Pw1Z3HUy99vvlaSg5IFrLdEQEs46PrFJStuKLxYk+lfalNXJp
	 RTn0GBh7kr4hwrNPVyhjhN0a8pkUB7Q5eb7BNoaNEBHaD35Q7rkDvwEvFq2k8K85/dg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=linux.dev;
	spf=pass smtp.mailfrom=linux.dev;
	dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=q2uzKyUW;
	arc=none smtp.remote-ip=91.218.175.18
X-Received: from mta0.migadu.com (out-18.mta0.migadu.com [91.218.175.18])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 785A1606A326
	for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 06:27:42 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 785A1606A326
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Envelope-To: netdev@vger.kernel.org
X-DKIM-Signature: a=rsa-sha256; bh=SzKF0geNnY3hQJz+ooTlCMfDo+JXvPqOuz4T1XRzYAs=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1795674461; v=1; x=1796279261;
 b=q2uzKyUWmYW76gWww2TN06L8nxMqkpe9D0yNRCFWfn3Eth4vYVL4MGDfjedQfeLLBYkfj+S2
 U/hl/BA9Qb+L8KJSjyFAjVInQog3p2v5iG8ObAOpn/kcCdo8qXvTEHA4ke52FSLOWykyBE59rJz
 /AYCMHUYPKuVphS6DPe7dVM0=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta12.migadu.com with ESMTPS id fc064d7af9643606;
	Thu, 26 Nov 2026 06:27:41 +0000
X-Mizu-Trace-ID: fc064d7af9643606
X-Migadu-Flow: FLOW_OUT
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-B4-Tracking: v=1; b=H4sIAAAAAAAC/33OTWrDMBAF4KsErauikUd/WfUepQRbGjeiQS6SE
 Q7Bd4/wIm2J6fLxmG/ejRXKkQo7Hm4sU40lTqkF9XJg/tynT+IxtMykkFo4KXnJVZ/GS1+nXE6
 UwsIdWgeggxIeWbv7zjTGZTPfWaKZJ1pm9tGacyzzlK/bswpb/49bgQuOQYAXyqMZzNvX9RLTV
 F592rgqHwQI4fYI2Qile29G29kR4YnofgiA3RVdI7wDY4ZhCE6rJwJ/E7srsBHSog8DWiSiP8S
 6rncAjmXdhgEAAA==
X-Change-ID: 20260922-srv6_flavors_endx-9489116d50c4
X-Cc: Hangbin Liu <hangbin.liu@linux.dev>, netdev@vger.kernel.org, 
 linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, 
 Hangbin Liu <hangbin.liu@linux.dev>
X-Mailer: b4 0.16.0