Article View: linux.kernel.netdev
Article #1645Re: [PATCH net-next v2 2/5] seg6: add RFC8986 flavor support for End.X
From: netdev-bot+sashiko
Date: Sat, 10 Oct 2026 10:21
Date: Sat, 10 Oct 2026 10:21
112 lines
9687 bytes
9687 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] End.X now accepts the flavor pair NEXT-C-SID + PSP but only
applies NEXT-C-SID.
--
seg6: add RFC8986 flavor support for End.X
This patch adds PSP flavor processing to the SRv6 End.X behavior by reusing
end_flv8986_core(). It also widens SEG6_LOCAL_END_X_FLV_SUPP_OPS so that
End.X advertises PSP support alongside NEXT-C-SID.
> diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
> index 4fcfcd48cfaed..521a9b0c09290 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 */
[ ... ]
> @@ -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);
[Severity: Medium]
Now that SEG6_LOCAL_END_X_FLV_SUPP_OPS is wider, what happens when an
End.X instance is configured with both next-csid and psp?
parse_nla_flavors() only rejects bits that fall outside the supported mask:
net/ipv6/seg6_local.c:parse_nla_flavors() {
...
if (rc < 0 || (fops & ~supp_fops)) {
NL_SET_ERR_MSG(extack, "Unsupported Flavor operation(s)");
return -EOPNOTSUPP;
}
...
}
So NEXT_CSID|PSP is now accepted for SEG6_LOCAL_ACTION_END_X. It gets
stored in flv_ops and reported back to userspace as configured.
On the data path, input_action_end_x() returns through the NEXT-C-SID
branch above and never reaches end_flv8986_core(). Once the C-SID argument
is used up, end_x_next_csid_core() falls back to plain End.X processing:
net/ipv6/seg6_local.c:end_x_next_csid_core() {
...
if (seg6_next_csid_is_arg_zero(daddr, finfo))
return input_action_end_x_core(skb, slwt);
...
}
input_action_end_x_core() only calls advance_nextseg() and then
input_action_end_x_finish(). It never calls seg6_pop_srh(), even when
SL == 1.
Does that mean the configured psp flavor is silently ignored, and packets
leave with the SRH still attached? A downstream node with seg6_enabled=0
would then drop them, and nothing reports an error at configuration time.
This also seems to contradict the comment above
seg6_flv_supp_ops_by_action():
* ... if a user specifies a
* flavor combination that is not supported by a given End* behavior, the
* kernel refuses to instantiate the tunnel reporting the error.
Before this patch, End.X refused psp entirely. End already has the same
mismatch in input_action_end(); this patch carries it over to End.X.
The note below the --- line says this combination is not handled and that
Andrea is preparing a fix. That note won't be in the commit log, though.
Nothing in the code or the commit message rejects or documents the
combination, and net/ipv6/seg6_local.c is not changed again after this
patch.
Could parse_nla_flavors() reject NEXT_CSID combined with any RFC8986
flavor? Or could the End.X mask stay at SEG6_F_LOCAL_FLV_NEXT_CSID until
combined processing is in place?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009-srv6_flavors_endx-v2-0-56ac7f838f41%40kylinos.cn
Technical Details
Message-ID:
<179162766256.434549.13511080924871737471@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344146-linux-kernel-netdev=dewy.ruReferences:
<20261009-srv6_flavors_endx-v2-2-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-344146-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v2 2/5] seg6: add RFC8986 flavor support for End.X Date: Sat, 10 Oct 2026 10:21:02 +0000 Organization: Usenet Network Message-ID: <179162766256.434549.13511080924871737471@kernel.org> References: <20261009-srv6_flavors_endx-v2-2-56ac7f838f41@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1304292"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:5+anaovsD/B4qsLT4DhfaR6hUio= sha256:khKwA3tvE+Idkuzft6aeSz8SE739cKIhfPSjP45Ch/s= sha1:erfnwpzXYobBuxCeylPURo2cAOQ= sha256:N94lOGZ/kbdX+YbTIdAe97Pq9idSzTU20SLBLZIX3NM= 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 5951D10F8AC; Sat, 10 Oct 2026 13:21:47 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 (2048-bit key) header.d=kernel.org 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 mvnFg1cBroQX; Sat, 10 Oct 2026 13:21:39 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-344146-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id C5A5010F869; Sat, 10 Oct 2026 13:21:34 +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 198972DB79; Sat, 10 Oct 2026 10:21:06 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 77E9D3D5C2C; Sat, 10 Oct 2026 10:21:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PLhRCRnr" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EA7536F8F0; Sat, 10 Oct 2026 10:21:03 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791627665; cv=none; b=HFpS2rhvidr0arBX2JslgUIEEAIthIc3CSup5IxtCumvuQLxvLGNAlvvTVsuc3sHh+WVY65JNjtvcTtubasG7Ud0e48Mg1UarqtY9SZ5nEYdbxocrwoJDRax/2XMU394bU6oNGovrjN2+e9Z9D2FCdcA143E6IXe63+L82IrXrk= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791627665; c=relaxed/simple; bh=eD4Zcwx2XKMocqxB6g9BVwV3EdemU3hTFb9LHqDyByc=; h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=ZctVU1BHsb2iE5MmzMeHp/CZJW99uTrijFUSd5rE/413Qg8LSEFc8pwKM7Lnv+opH2k8D76chxYQAPqSyJ1NLy4LDvqwiG8RjTvv8c+K9irWwHHHlwBFldeYtY4tluWSYA+6M5KQ6ZOUx72yCQOsdvyqv+VRdjJyuaIdzxvHY44= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PLhRCRnr; arc=none smtp.client-ip=100.103.45.18 X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AB051F000FF; Sat, 10 Oct 2026 10:21:03 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791627663; bh=eX49ecnK1yX0oQBGYjqLmGFhTNizuDshcWBPiQNkZQU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=PLhRCRnrIngq166grwddtQHIq+eI877lyBC0oKn1Ex02MNNAQHFvBq3o4zXYpP9HH LcDeDSca9dpJ4KpF9GMKpvazDJ8SoMubbQ35UbQ/cZq7/4zm+RGE6/A93nfjNRCom4 g7Fx80AIGgrWnHhhAxYItgRdf80/Tph08WrvWJ1wUg23jD2REUCcSvAoJ5SkyeWbU2 ICfm9e17ANXlXVewnJHzzbt/enFygFNHGnNbZZt6XNpATvLZdDPgJoqUae+4+c4gHo xR5DsN7hRYjATgEqh8DMspJQRxQAj6BPJt82VEm13hB1phsTxC/DLb0bZQpVDPJoUD 3btFfUps+kIqA== X-Cc: andrea.mayer@uniroma2.it, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, shuah@kernel.org, edumazet@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, liuhangbin@kylinos.cn X-In-Reply-To: <20261009-srv6_flavors_endx-v2-2-56ac7f838f41@kylinos.cn> X-sashiko-severity: Medium 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>