🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #1165

[PATCH net-next v2 2/5] seg6: add RFC8986 flavor support for End.X

#1165
From: Hangbin Liu
Date: Fri, 09 Oct 2026 09:58
71 lines
7972 bytes
From: Hangbin Liu <liuhangbin@kylinos.cn>

Previously End.X only supported NEXT-C-SID, with a plain fallback to
input_action_end_x_core(). Add PSP End.X processing by reusing
end_flv8986_core().

Add SEG6_LOCAL_FLV8986_SUPP_OPS to SEG6_LOCAL_END_X_FLV_SUPP_OPS so
End.X advertises PSP flavor support.

Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
---

For Sashiko:

With the SEG6_LOCAL_END_X_FLV_SUPP_OPS mask widened, parse_nla_flavors()
now accept the combination next-csid plus psp for an End.X instance. And
the current code is unable to handle this combination. The End instance
also has this issue. Andrea is preparing a fix for this bug.
---
 net/ipv6/seg6_local.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index 4fcfcd48cfae..521a9b0c0929 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -121,7 +121,8 @@ struct bpf_lwt_prog {
 
 #define SEG6_LOCAL_END_FLV_SUPP_OPS	(SEG6_F_LOCAL_FLV_NEXT_CSID | \
 					 SEG6_LOCAL_FLV8986_SUPP_OPS)
-#define SEG6_LOCAL_END_X_FLV_SUPP_OPS	SEG6_F_LOCAL_FLV_NEXT_CSID
+#define SEG6_LOCAL_END_X_FLV_SUPP_OPS	(SEG6_F_LOCAL_FLV_NEXT_CSID | \
+					 SEG6_LOCAL_FLV8986_SUPP_OPS)
 
 struct seg6_flavors_info {
 	/* Flavor operations */
@@ -824,7 +825,7 @@ static bool seg6_pop_srh(struct sk_buff *skb, int srhoff)
 }
 
 /* process the packet on the basis of the RFC8986 flavors set for the given
- * SRv6 End behavior instance.
+ * SRv6 End, End.X behavior instance.
  *
  * Returns with skb freed on failure. On success, the caller must complete
  * final processing and forward the packet.
@@ -923,12 +924,20 @@ static int input_action_end_x(struct sk_buff *skb, struct seg6_local_lwt *slwt)
 {
 	const struct seg6_flavors_info *finfo = &slwt->flv_info;
 	__u32 fops = finfo->flv_ops;
+	int ret;
+
+	if (!fops)
+		return input_action_end_x_core(skb, slwt);
 
 	/* check for the presence of NEXT-C-SID since it applies first */
 	if (seg6_next_csid_enabled(fops))
 		return end_x_next_csid_core(skb, slwt);
 
-	return input_action_end_x_core(skb, slwt);
+	ret = end_flv8986_core(skb, slwt);
+	if (ret)
+		return ret;
+
+	return input_action_end_x_finish(skb, slwt);
 }
 
 static int input_action_end_t(struct sk_buff *skb, struct seg6_local_lwt *slwt)

-- 
2.55.0
Technical Details
Message-ID: <20261009-srv6_flavors_endx-v2-2-56ac7f838f41@kylinos.cn>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343567-linux-kernel-netdev=dewy.ru
References: <20261009-srv6_flavors_endx-v2-0-56ac7f838f41@kylinos.cn>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343567-linux-kernel-netdev=dewy.ru
From: hangbin.liu@linux.dev (Hangbin Liu)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v2 2/5] seg6: add RFC8986 flavor support for End.X
Date: Fri, 09 Oct 2026 17:58:38 +0800
Organization: Usenet Network
Message-ID: <20261009-srv6_flavors_endx-v2-2-56ac7f838f41@kylinos.cn>
References: <20261009-srv6_flavors_endx-v2-0-56ac7f838f41@kylinos.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1078729"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Z6iG2Xiti9EZeS3thXkNoIdTp2I= sha256:XZgjmKOuHBj3+ecz/VlVG1Y6X8SqY4O5lvB4QLT9+i4=
	sha1:tbKQR0BwztjACBLEK5TEAeqbZEU= sha256:Ba2zMhDy8Z189G+hiTX4aNCEzsFLQXr0fCgHtxW7V2E=
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 CB90410F646; Fri,  9 Oct 2026 13:00:56 +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 2UiHC-rPI0qD;
	Fri,  9 Oct 2026 13:00:54 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-343567-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id D8F8A10E9C2; Fri,  9 Oct 2026 13:00:50 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id BFA4236E99; Fri,  9 Oct 2026 09:59:27 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 7702849BD83;
	Fri,  9 Oct 2026 09:59:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jkJE+4VA"
X-Received: from mta1.migadu.com (out-45.mta1.migadu.com [95.215.58.45])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9BA54A33F5
	for <netdev@vger.kernel.org>; Fri,  9 Oct 2026 09:59:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.45
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791539952; cv=none; b=FVXq4Jel4IEYM4NEEc0vrM98iFh9IXa0E33/7U9K/YVjyDxcWSSB2YyvTtKrr+TaUgFAzC84XQqJmrGOsPWtrElKMeuGzE4OIfjrKhyUxg7kSdE7kdk1yQ07yXDdeVtGNQAZFJZeLMSppbqGRuTSkkF+Z1jd9L4WnpUA4tUcyIQ=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791539952; c=relaxed/simple;
	bh=9uZAzjSEaXX7aLkriGIzSgNvzuAo+od4BKnoGGnFE6M=;
	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
	 In-Reply-To:To:Cc; b=KQWxctLNmENklr+O9exXBaQtPDlYMqcN4h6HeknB0jwp3C0pUKz/Feo1wXZ5wPVpBukE91C2NMwHCrM1+n6oL4knyAtA/m7+yvhP+O0fOsN3C7J3acYKAVYTQAG0CIoIMk8F42NxtXA6xBbSVsCwy0BpPXy/1OnJyUlhiVdILQQ=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=jkJE+4VA; arc=none smtp.client-ip=95.215.58.45
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=9uZAzjSEaXX7aLkriGIzSgNvzuAo+od4BKnoGGnFE6M=;
 c=simple/simple; d=linux.dev;
 h=from:to:subject:date:message-id:mime-version:content-type; s=key1;
 t=1791539948; v=1; x=1792144748;
 b=jkJE+4VAGR+Eb/khT/98Wkjf8m/LrNbqwzeXQvsXfFOidPPwGX+lsgUJOQ2SEdN5vNb7UAXf
 dGS/DI6Cvz2s1YOGy8GNJJaE+yid8DksYrbE0EtaKfhkDallKB/echEe1ro8d7CYrB0oSCaF9VL
 QGwnDyPy+8AncNvFzM321dSM=
X-Envelope-To: netdev@vger.kernel.org
X-Received: by mta10.migadu.com with ESMTPS id 925135fb1594fcaa;
	Fri, 09 Oct 2026 09:59:06 +0000
X-Mizu-Trace-ID: 925135fb1594fcaa
X-Migadu-Flow: FLOW_OUT
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261009-srv6_flavors_endx-v2-0-56ac7f838f41@kylinos.cn>
X-Cc: Hangbin Liu <hangbin.liu@linux.dev>, netdev@vger.kernel.org, 
 linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, 
 Hangbin Liu <liuhangbin@kylinos.cn>
X-Mailer: b4 0.14.3