🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25670

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

#25670
From: Hangbin Liu
Date: Wed, 02 Dec 2026 08:46
92 lines
12430 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-5 refactor the PSP selftest setup/cleanup so flavor tests can
be added more cleanly. Refactor test_kernel_supp_or_ksft_skip with
checking the route really add the flavor.

Patch 6 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 v6:
- Patch 03: sync the variable format with others (Andrea Mayer)
- Split the kernel support checking changes to a new patch (Andrea Mayer)
- For patch 06 (Andrea Mayer)
  - update commit description and function comments
  - use exact route for setup_rt_unreachable
  - use the new check_kernel_support function for End.X PSP testing
  - some other minor changes
- Link to v5: https://patch.msgid.link/20261126-srv6_flavors_endx-v5-0-4d8232eec404@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 (6):
      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: verify PSP flavor on the installed probe route
      selftests: seg6: add PSP flavor testing for SRv6 End.X

 net/ipv6/seg6_local.c                              |  31 +-
 .../testing/selftests/net/srv6_end_flavors_test.sh | 627 +++++++++++++++++----
 2 files changed, 545 insertions(+), 113 deletions(-)
---
base-commit: 0a837a30e55bbea2afb01cf0b3ec0c1d789a73ad
change-id: 20260922-srv6_flavors_endx-9489116d50c4

Best regards,
--  
Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID: <20261202-srv6_flavors_endx-v6-0-4e50b828e702@kylinos.cn>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375643-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375643-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v6 0/6] seg6: add End.X PSP flavor support and
 selftests
Date: Wed, 02 Dec 2026 16:46:26 +0800
Organization: Usenet Network
Message-ID: <20261202-srv6_flavors_endx-v6-0-4e50b828e702@kylinos.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1926342"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:e3wqDZkpysqjqrqq3tjHpnwj0yM= sha256:mtf0DvNFseSzqZuTmRwYde9saDWeoDazceRZUxoHuZg=
	sha1:y4yDoXO2ikIY5kKxbfneWv8wCJs= sha256:1gwd9JTe/HO2oX8w1YZEZUpQLz4jUpJX6E3EYgJWzDk=
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 1F8D81175B4; Wed,  2 Dec 2026 11:47:27 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 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, URIBL_BLOCKED=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 uSODGYYgKg_w;
	Wed,  2 Dec 2026 11:47:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375643-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 05B661175AE; Wed,  2 Dec 2026 11:47:11 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 0AABC26115; Wed,  2 Dec 2026 08:47:06 +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=1796201222;
	b=DwITvKfv/LCHxmessDVlEwweCtXO7VlqagRC5ECnJYuecQKReSueB/hZWYnhP6SVYA8M
	 im3rsuMICtRG4+6XqNTbKErH+1xQDu0AKeenQHNtz+f8TCVbmjKLSpiv0ZALEbYTFMjXc
	 hvKLW98XY5uux6bus6sKqWypZiTI+4Mtwy7XqJR9xMFC2Fc72vnC32nF5Voqz8xYWA/bT
	 Szfsqouj2grUWIncBu4Mf0L1EJw1c48Jvn0+WCUTyYEcQ4FGY6dGEtih66ISlf4C7v/Wb
	 NTZTDTshnc45yWqWJ8h5SSsbkdLr30ftrUVZuUSKxUpDfsNgQgymY4UKJzrZN6LWMWg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796201222;
	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=9YRla3sELBsStxzPzKY7OvrunMXNJ4ZWRcFRjoSyh4c=;
	b=DKJMLe9QfBonVGFF3KoFHEiWaa0dgdno5PJZyw9sHAOK/wAfPao6FMM0LAP+w21WksrL
	 P/4Gg3lzIZMCoPgURvf2j83FDptaPCvZfi33qNrCYFDLe74nByphuXeKnEQeaVSXlY9dx
	 doEMYCz0uf0GAkO2ikcZb3BYUgNNinhkeGUWyaZs+OC7y/RXFaPdRvOpHqQiHwNbq0n+q
	 WTYQPBxhCthb8wib4GmCHi0hvbxxkw60S7+On4HlewSEZJ4dFmoWKJbYugCdA6VpF2oQQ
	 sGjdgRS0mwywEllBfpfZ5IbT+LGm/4qV8nmcthfRD2ecMGhcMn+QfkYZaLtfM5MYF/g==
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=qH1bkxw6;
	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 B6BB6606A32A;
	Wed,  2 Dec 2026 08:47:02 +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=qH1bkxw6
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.119
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796201221;
	b=ziOR2dLMl5CYKdXegQuLVrzkQm3C8szJr4WCdTC8HLFhkYPZ+Gs3K85wLw1mmWuFhby5
	 F4KtNwK3FzcAP60Q+EtlwMT/hKaO3je/fP/TBx3OZt3VIb/MAIBVaonI+e1a9dJNL98nf
	 BeVIY8RuYvtpOleqCQPjRvFQQTyOaChc0TYJbAtvruLBrXb6wCIn3FKuyWeGwoS5TtX/I
	 wPaXL7GYu9cHp/ZQehdO4x4VXnx02GP57O8o8GSha44rUzEfeNIZcCf9F/4z0iQzXApUG
	 JI3ogp+K2prMY/Xp1sFPp136wMGBAT0vyMNko+SZUIbaOO/EOUbgURpUkaiVPdH2yJQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796201221;
	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=9YRla3sELBsStxzPzKY7OvrunMXNJ4ZWRcFRjoSyh4c=;
	b=WNxPNwOgnNheqJWVPsU0JPc3QIYmKdNTkIEZx7AH6pY2945wNzZ8ZuemzV6o+vOdBy2C
	 Q+Cs27FWmEhg7H+apgYUR9HuLkrBmsYFJD0oXnvBKAzUIOJ89XCNFcF2+tYWGC1OgjY7Z
	 9842+z+R9Pr9lJQ+TAR4s9X42Y/r2Jpjb0lGbgCGo1ZU1iP1cHS4e2S8JlU+qnzyn3mgG
	 qdY2B20jcaUCgvaDFdhmzQGOoiGcl4KGRg1I4tzFVtG4LcO7CnI2vORb7Xkl1dm9Imdf3
	 DrMaPbpBdOGsudGFsw6iR6IX4NFDpXVOxpsEDhV/2j4CPJXXnkB3gvF5eYAUmD0lplw==
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=qH1bkxw6;
	arc=none smtp.remote-ip=95.215.58.119
X-Received: from mta1.migadu.com (out-119.mta1.migadu.com [95.215.58.119])
	(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 82818606A696
	for <netdev@vger.kernel.org>; Wed,  2 Dec 2026 08:46:53 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 82818606A696
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=nNYSPhGNzHBfwV3SjmQpwuDor94FAgbS1ZdAUgY28lg=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1796201212; v=1; x=1796806012;
 b=qH1bkxw6ITPd1vYSYDVkoEyOdX94UuS9WBGDwJUk0wGYLGWTSc7hO5rFI4CsYs6ccvibizDk
 7VMs6cCydYaVLNsSKhD48nQv1x3JVwF5Zrou0wsOwCmB4/o/LcN/aVPYUWps9+z/uHo12AAd5vV
 oqxTSxnqWcQbYoUr1FL1lBcY=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta12.migadu.com with ESMTPS id f0dc63d3b0bec59c;
	Wed, 02 Dec 2026 08:46:52 +0000
X-Mizu-Trace-ID: f0dc63d3b0bec59c
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/33Q3WrEIBAF4FdZvK5FzfjXq75HKUvUSVe6mKJBs
 ix594oX7ZaEXh4O880wd1IwRyzk5XQnGWsscU4tqKcT8ZcxfSCNoWUimFDMCkFLruo8Xcc653L
 GFFZqwVjOVZDMA2lzXxmnuHbzjSRcaMJ1Ie+tucSyzPnWl1Xe+3/cyimjEBj3THrQTr9+3q4xz
 eXZp85V8UNwxuwRIRoh1ej1ZAYzAd8Rwy/B+eEVQyO85Vo754JVckfAI3F4BTRCGPDBgQFE3BH
 ygRDqiJD9F0YMAtEDgz/Etm3fpqqdYMkBAAA=
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