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

From: netdev-bot+sashiko

Date: Mon Nov 23 2026 - 09:24:19 EST


Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The concern: in net/ipv6/seg6_local.c, the patch adds
SEG6_LOCAL_FLV8986_SUPP_OPS to SEG6_LOCAL_END_X_FLV_SUPP_OPS.

--

seg6: add RFC8986 flavor support for End.X

This commit adds SEG6_LOCAL_FLV8986_SUPP_OPS to the End.X supported flavor
mask, so End.X now accepts the PSP flavor. input_action_end_x() now handles
flavors the same way input_action_end() does: NEXT-C-SID is evaluated
first, then end_flv8986_core() runs, then input_action_end_x_finish().

> diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
> index 65d552f87fa39..c827a745fe176 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 */

[ ... ]

> @@ -986,12 +987,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);
> }

[Severity: Low]
This isn't a bug, but at this commit no selftest covers the new End.X
flavor configurations.

With the wider SEG6_LOCAL_END_X_FLV_SUPP_OPS, netlink now accepts End.X
with "flavors psp" and with "flavors next-csid,psp". Both used to fail with
-EOPNOTSUPP. Both now go through seg6_use_next_csid(), end_flv8986_core()
and input_action_end_x_finish().

At this point, tools/testing/selftests/net/srv6_end_flavors_test.sh only
tests "action End flavors ...".

It looks like the later patch in this series, "selftests: seg6: add PSP
flavor testing for SRv6 End.X", fills this gap. That patch:

- adds setup_endx_flv_psp(), which installs End.X policies with psp
alone and with next-csid,psp
- adds host_srv6_endx_flv_consumed_srh_tests()
- makes test_kernel_supp_or_ksft_skip() probe End.X psp
- runs the new tests from test_endx_flv()

If that patch is merged with this one, nothing more should be needed here.

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119-srv6_flavors_endx-v4-0-284cdb484eee%40kylinos.cn