Article View: linux.kernel.netdev
Article #22910[PATCH net-next v5 2/5] seg6: add RFC8986 flavor support for End.X
From: Hangbin Liu
Date: Thu, 26 Nov 2026 06:27
Date: Thu, 26 Nov 2026 06:27
67 lines
10531 bytes
10531 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.
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:
<20261126-srv6_flavors_endx-v5-2-4d8232eec404@kylinos.cn>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371891-linux-kernel-netdev=dewy.ruReferences:
<20261126-srv6_flavors_endx-v5-0-4d8232eec404@kylinos.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder2.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371891-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v5 2/5] seg6: add RFC8986 flavor support for End.X Date: Thu, 26 Nov 2026 14:27:24 +0800 Organization: Usenet Network Message-ID: <20261126-srv6_flavors_endx-v5-2-4d8232eec404@kylinos.cn> References: <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="398190"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:32tCpWz0epvZE85Cshrxa/2CqOI= sha256:Nv/PQw2lwjC+xAJXr+/odJV6wAM30RVSZycn4oQUDNM= sha1:9HespHTDxJBFG+HPYGPf0gPXC/4= sha256:3dBZKJ6WJGteAKVrGWxXsN1Y9FHOrSbEakwcrGbmuW0= 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 B0605125EB3; Thu, 26 Nov 2026 09:28:15 +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 CeELYmDD8Vyj; Thu, 26 Nov 2026 09:28:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-371891-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 59769125EB0; Thu, 26 Nov 2026 09:28:03 +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 B41DA2BA41; Thu, 26 Nov 2026 06:27:58 +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=1795674476; b=DSzxRintM7xy3Uj/2yh/Pt2/Ai3JoDEYiVa/VBdNtbLFQTdEjWBhKScR7dkj9uRw1k9Y D35HCxv94+Uv+R8n00qsgkM+IRtgx7vO9OB0+LwthUIXFyx5jfAeuMIodUTILRB0AM95O b3S9HGL/snK8j1+lJ/IOMrAYhsMBh4QU7EAxfrS6KrS8/GZWGqlKHZNQzAk4XPzsvFBxf 7ihxOyfPBtLtVVFoCo5uROTV0F4NlxJ/vguBWfR9agnH7RVlcS0j/wQbOfEN2lSt8lOeK Kv4dNQdPec3JDL/rjb4w/1EF1XI74jrvJA/m69pEGl3IScUvvIg/374MHdlwPYiPNPQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795674476; 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=kAif0q/6CgKdYC0zX+fdqIkGgsOa0bqu+AUJLWOQHqE=; b=Fl5omJIJUSQ8Us2/w8XuPjJ1enRixxzLc0IK+W+ePHYnSoPYp8LeB2eYj8AQPnAeuLwR haGVC1VRcxqs6X3dp4efUwcNRPggPvA/h63huZ7vU7oNC3FEF7MHeAR6tSd8UcZFcZYdk huRd5V+2fhT3H2lz+Fv42pr9FfQu8CKE9iP+M7HFzjLAqP0+C3v3Iv1H1AeUzPHsWpu8s NWJyMO1hHexq2lKQXDDNtexzgu+l3AFLG2OiYQdfFv9io2lkJ1X5L5iSR0MzDJoAiWHXt K6erZD4sPptxkSb/dbhPSt80bqCXFyy2lePgsa3LxK7L/Hurr4NGgDmQLoAXet14Iaw== 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=idXYGkC8; 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 AD2CB606A33A; Thu, 26 Nov 2026 06:27:56 +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=idXYGkC8 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.219 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795674475; b=pOiutwtutgbkgwIedE7Og1Ru46tKCBIDOCoSulRHSYpULYgs9jFUXwqpFSzAkmEg62Fu m3S0u1uzMah1JCxpiBtboJmpNlCqc5XmMcnSi3lSVWgYNUxj4B5fhtwqxWDsbP2qDeJ03 ySS13STzf4JQ0XTm8U3jWDiiCOfMck9HUg4BESDM5qlIa2BaAvLVJdMubrtt5Yvy3f9Xs fos9SGr+yekk0K8gTLNsQh9egbUp6pPgWunQ+fMWc/tbso1yBINZuJQjbZsa6d0nNLTeC Nm2tTK5OEATKuicjpMGDpiOFRY4LP0Ix+SluvmFmOfDkNinz74UlrUnebF6s8rBL6eg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795674475; 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=kAif0q/6CgKdYC0zX+fdqIkGgsOa0bqu+AUJLWOQHqE=; b=fHBOQVzWHo8UHDmFzuFZgTKgUOsallMu+RIvO40LOpHJMEa55KEkj7KPYzrjB6TVJpf+ +zjmUfm9jnD4VbpHrK0Ho6QMKPPsk2LtHKPI4WGqJqAqNeGlGZc3amXJ3q6Ew85iVPbbK 4/lcA5TInpzKsMtIOeWdfi2iXV2tCcspClgNdKWKsuYuAGXOa/l5gVqTHEq+kaCQJK5Yb 8ra+ctwttAjKqitpSsXpXlepXOI8ykmBt4KYx9M5D2Vvq73U7z/24IEbaM/s5yaj6C6fl Dk+udFoXQ3mJanKEdMG4Oz6zKT8mo88VH86HXI8v5Gql5yewqqMnkAMv8Csb0MeVfdQ== 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=idXYGkC8; arc=none smtp.remote-ip=95.215.58.219 X-Received: from mta1.migadu.com (out-219.mta1.migadu.com [95.215.58.219]) (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 3AD1F606A321 for <netdev@vger.kernel.org>; Thu, 26 Nov 2026 06:27:54 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3AD1F606A321 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=43GUnkQaaKH2LIoFuLD/g5YfhAyKSZZ4BS7eLLF7nnA=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795674473; v=1; x=1796279273; b=idXYGkC8iox+ogjgKpFy3rLTtUf/KfiQlzajImKPg4g9dx4OGiliTBe9BO9mHrLFPK7wVUlD 8vet8yThUkv78PD8NkfG2F7leRazDQcAi91cnA/SFdYBIh20PZrQx2Y/ZTY9iaWMiy+hlaHGhBe R6G0kO0hwz3q53Pg3MX1x7Ys= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta12.migadu.com with ESMTPS id fcf668d7b8c6b4c4; Thu, 26 Nov 2026 06:27:53 +0000 X-Mizu-Trace-ID: fcf668d7b8c6b4c4 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: <20261126-srv6_flavors_endx-v5-0-4d8232eec404@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