From: Hangbin Liu <hangbin.liu@linux.dev>
To: Andrea Mayer <andrea.mayer@uniroma2.it>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
Hangbin Liu <liuhangbin@kylinos.cn>,
stefano.salsano@uniroma2.it
Subject: Re: [PATCH net-next 2/5] seg6: add RFC8986 flavor support for End.X
Date: Thu, 24 Sep 2026 18:55:43 +0800 [thread overview]
Message-ID: <arUBr6L0qtgr8WoH@fedora> (raw)
In-Reply-To: <20260923180506.4350920e5bf32d4910a192d3@uniroma2.it>
Hi Andrea,
On Wed, Sep 23, 2026 at 06:05:06PM +0200, Andrea Mayer wrote:
> > diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
> > index 584e6aca3893..7462da1da362 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)
> >
>
> This adds PSP to a mask that already had NEXT-C-SID. PSP alone then
> works through end_flv8986_core().
>
> > struct seg6_flavors_info {
> > /* Flavor operations */
> > @@ -841,12 +842,19 @@ 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);
> > }
> >
>
> The problem is the combination with NEXT-C-SID: the NEXT-C-SID early
> return above is still taken, and neither branch of
> end_x_next_csid_core() applies PSP. So "End.X flavors next-csid,psp"
> becomes configurable and PSP is never applied.
Ah, right. The NEXT-C-SID could combine with other flavors.
>
> The same mask and the same early return are already in End, where the
> combination is accepted and PSP is not applied either. I will send a
> fix for that to net.
OK
>
> For this patch I would handle the combination.
Thanks
>
> On the selftest side, the combination of next-csid and psp is not
> covered yet. I am going to add coverage for it in any case with the
> End fix, and I would be glad to do it with you if you are interested:
> the same coverage would serve End.X too, if you decide to handle the
> combination there.
Yes, I will add support for the End.X combination (and End.T in follow-up
patch) once you add the next-csid/psp selftest.
Thanks
Hangbin
next prev parent reply other threads:[~2026-09-24 10:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 8:54 [PATCH net-next 0/5] seg6: add End.X PSP flavor support and selftests Hangbin Liu
2026-09-22 8:54 ` [PATCH net-next 1/5] seg6: split final End process out of flavor processing Hangbin Liu
2026-09-23 11:46 ` Andrea Mayer
2026-09-24 8:11 ` Hangbin Liu
2026-09-22 8:54 ` [PATCH net-next 2/5] seg6: add RFC8986 flavor support for End.X Hangbin Liu
2026-09-23 16:05 ` Andrea Mayer
2026-09-24 10:55 ` Hangbin Liu [this message]
2026-09-24 11:57 ` netdev-bot+sashiko
2026-09-22 8:54 ` [PATCH net-next 3/5] selftests: seg6: move SRv6 End PSP setup into its own helper Hangbin Liu
2026-09-24 11:57 ` netdev-bot+sashiko
2026-09-22 8:54 ` [PATCH net-next 4/5] selftest: seg6: add explicit cleanup for SRv6 End PSP test Hangbin Liu
2026-09-24 11:57 ` netdev-bot+sashiko
2026-09-22 8:54 ` [PATCH net-next 5/5] selftests: seg6: add End.X PSP selftest Hangbin Liu
2026-09-23 1:48 ` Hangbin Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=arUBr6L0qtgr8WoH@fedora \
--to=hangbin.liu@linux.dev \
--cc=andrea.mayer@uniroma2.it \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=liuhangbin@kylinos.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
--cc=stefano.salsano@uniroma2.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®