Article View: linux.kernel.netdev
Article #25671[PATCH net-next v6 2/6] seg6: add RFC8986 flavor support for End.X
From: Hangbin Liu
Date: Wed, 02 Dec 2026 08:46
Date: Wed, 02 Dec 2026 08:46
68 lines
10739 bytes
10739 bytes
From: Hangbin Liu <liuhangbin@kylinos.cn>
The End.X behavior only advertises NEXT-C-SID and falls back to plain
input_action_end_x_core() for anything else, so "End.X flavors psp" is
rejected at present. RFC 8986 defines PSP for End.X as well, and
end_flv8986_core() already implements the flavor dispatch used by End.
Add SEG6_LOCAL_FLV8986_SUPP_OPS to SEG6_LOCAL_END_X_FLV_SUPP_OPS and
process flavors in input_action_end_x() the same way input_action_end()
does. With no flavor configured the behavior is unchanged.
Reviewed-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
---
net/ipv6/seg6_local.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index fc651a83e4b7..6830f7d5e066 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -122,7 +122,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 */
@@ -939,7 +940,7 @@ static struct ipv6_sr_hdr *seg6_flv8986_get_srh(struct sk_buff *skb)
}
/* 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.
@@ -1041,12 +1042,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))
+ /* NEXT-C-SID is evaluated first, when configured */
+ if (seg6_use_next_csid(skb, finfo))
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.56.0
Technical Details
Message-ID:
<20261202-srv6_flavors_endx-v6-2-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-375645-linux-kernel-netdev=dewy.ruReferences:
<20261202-srv6_flavors_endx-v6-0-4e50b828e702@kylinos.cn>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-375645-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v6 2/6] seg6: add RFC8986 flavor support for End.X Date: Wed, 02 Dec 2026 16:46:28 +0800 Organization: Usenet Network Message-ID: <20261202-srv6_flavors_endx-v6-2-4e50b828e702@kylinos.cn> References: <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="1926386"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Pn4eRTbK7r4+JN22hlHQWTTikwA= sha256:RHRP05YC3RkTxGMi0GUmTYbp8TfIXRnkfHD3ev8sXQA= sha1:cBLdxpgBU57fCzzVk+7kCObB9hk= sha256:AVgEhb+nxEHLovKPyLdOAiL2cvGVStXVVocCl+C39v4= 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 337491175AE; Wed, 2 Dec 2026 11:47:29 +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 Cv_w0PL070qw; Wed, 2 Dec 2026 11:47:26 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375645-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 261561175AF; Wed, 2 Dec 2026 11:47:18 +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 43AA8261E3; Wed, 2 Dec 2026 08:47:14 +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=1796201230; b=ISXpf5937e1t1R3qdtxKM7oOcV/LuZNl4xZXD/eNnQilDa+dk8r0azXT5C7cl0+LNt8L X05SXGcxlhBp6K6PDLOkoAZlalT6rf5Q8CsO78KXLjW2pqzgQO7zJl0bU38O4DHgkbUO+ z7LyWKKSC+Cls2qdPt8XNdUvC6roex4zKkleQgb1kVkUV+4u8W5IMs8q1jZGacUGKN0MZ AomGn7i8JGq/Kcum21L3lv0e7wlcqU41BNIov2lREpGhs/6O3s07rO6S8xX4Y0oBiLdJF XSLqw1FjGS4moB2s4ugcipeg+LgHv6d3bjaaxeQk9W3vzH+fChkhDV7k4qcD4MltkfQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796201230; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer; bh=rh3e0KtP3H9unXzhtwNtdQKV9Qlf/WU4/9Hdcf+h+T0=; b=FZxL5ka7DxqVWG5/238OmLB/VN/OQVkur8XqgJLyepOo/vSUYvcIsP7fX+qzMIStIdFL k7TcshWOI97I00HxeNXIBU/+RhCHURY02ZkOFOFWrxEtnvICNfuR2SP4SQWwrITgvGjrw Fr7FHfZ0uVW4Wx/NaTYfXYG7RQAGcem02IjcPL6rbH0hPX5bNrySodGvmMcOGw7oi3PpK FTDSg3FE+yGny2IcuNnX3DI8tsI9BW2eXlQLkol5AbBppl58CKVH+9jgWrQ3o4Yf0/A2+ OPvLCFSYz44f3L9b52zJbwP4CZMOSigr6xHgDRbRckkJA3UjkKIfGjVljlUcfNRhmaQ== 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=ScscEzJp; 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 7E28B606A6A0; Wed, 2 Dec 2026 08:47:10 +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=ScscEzJp X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.242 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796201229; b=hfxxf/q1f+k4F1f5vHkqaFsWjhUIVsVdZqVey+ZGqLnLmPLinLsspi1MV0tFFFcxhjgM +NblC78ymT+KssRRin3Mpt5cBkhhofP3fg5ehVEkS/J1a/jU71IT5SexiKX7hAvBl9uA3 j4zQ8Q8+YDTUxUgV2KrmSbpekMyZzVohCx2xcejulxywlb2dbSB9g4bh2mRu/ms7uBqnC OngHUMo0i5+X0jZeKbK2ZAqEHdDy2PAScapKY0hNq725vFA8c8rVfBWyu12r73YZJwBeb t7arV5ry3bjZJj1LwO7bFpvYsDCp1my9KbwcPOqVUzW8B7M5b41tbMs8Hj5FpNHdOuQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796201229; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer; bh=rh3e0KtP3H9unXzhtwNtdQKV9Qlf/WU4/9Hdcf+h+T0=; b=2ycqEpGe/ULqNvNQAkmMhEqz/DjiPZi34GRkUxN9rjRus8Dr/uQrK7ClJBUZ0ZaEHFVG mJYOMJSfp9+KN9Bok1JxEKYoAF75dskFr6m0gv3v2qLVS9G5/6yKMW5XEdQVQPS0ORXC9 axehUa3SyLscoty9LOnytEquKeLg25Enrk8KV8pqKDWD+hStBritJDZzFE1bdijrSRcCd 6aL7GpK8pRjNKs1C2D0QmvC7k3YjXS436oXAjgzTMaxkcc4RIUX6jBJWJJuZbSHurl56N jIx2sq1/HZvI+5ypsMdfh6FfPprA4bMq1rSie9NXWU1e3zPTHJ0yHNX2ohzu7yWpOhA== 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=ScscEzJp; arc=none smtp.remote-ip=91.218.175.242 X-Received: from mta0.migadu.com (out-242.mta0.migadu.com [91.218.175.242]) (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 C4EBE606A691 for <netdev@vger.kernel.org>; Wed, 2 Dec 2026 08:47:06 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C4EBE606A691 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=Juc6Kp9ev7GsCm3OYrCyIwuMUBzsmNDOuxJudQuAGh4=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796201224; v=1; x=1796806024; b=ScscEzJppbryMvzeO77SfIat8iQL2xPaJyD18L4Zv+xgj7hgzr89tmTvD6A667YW4YVVQEB3 TiP5REWZSTp3FVy7CULq/DuX7rAjyilohzyZ+wNCNgfzre7AMFul1FLWqdh62BS41IAtX6QlqNs wA+zcNDnIN3U+IuRN+Qj1ZD4= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta12.migadu.com with ESMTPS id eee71944fdbf0e15; Wed, 02 Dec 2026 08:47:04 +0000 X-Mizu-Trace-ID: eee71944fdbf0e15 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-In-Reply-To: <20261202-srv6_flavors_endx-v6-0-4e50b828e702@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 <hangbin.liu@linux.dev> X-Mailer: b4 0.16.0