mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Mayer <andrea.mayer@uniroma2.it>
To: Hangbin Liu <hangbin.liu@linux.dev>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	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 <stefano.salsano@uniroma2.it>,
	Andrea Mayer <andrea@common-net.org>,
	Andrea Mayer <andrea.mayer@uniroma2.it>
Subject: Re: [PATCH net-next v6 6/6] selftests: seg6: add PSP flavor testing for SRv6 End.X
Date: Sat, 5 Dec 2026 05:25:37 +0100	[thread overview]
Message-ID: <20261205052537.7b1e603d74bc9cba165a2818@uniroma2.it> (raw)
In-Reply-To: <20261202-srv6_flavors_endx-v6-6-4e50b828e702@kylinos.cn>

On Wed, 02 Dec 2026 16:46:32 +0800
Hangbin Liu <hangbin.liu@linux.dev> wrote:

Hi Hangbin,
thanks for the v6 and for taking in all the points of the v5 review.
Just one comment below:

> From: Hangbin Liu <liuhangbin@kylinos.cn>
>
> Add an End.X flavor scenario to srv6_end_flavors_test.sh that applies
> the same PSP policies as the End scenario, alone and combined with
> NEXT-C-SID, with every node bound through its adjacency (e.g. 4>2 for
> rt-4 towards rt-2, 2>h towards the host).
>
> Extend policy elements to <nodeid:op:act>, with <op> specifying the
> flavors and <act> selecting the action. Encode the adjacency in End.X
> SIDs, for example fcff:3::400a and fcbb:0:34a9:: for rt-3 toward rt-4.
>
> Add consumed-SRH coverage for End.X. Insert the extra SRH at ingress
> because End.X forwards through its configured adjacency.
>
> Install unreachable routes in table 90 on rt-3 and rt-4 for the hs-1
> to hs-2 policies (i.a) and (i.c). These routes make the next SID
> lookup fail if End.X falls back to End, while forwarding via nh6
> still succeeds. The route on rt-4 in (i.c) covers the NEXT-C-SID
> shift.
>
> Probe kernel support for End.X PSP and skip the End.X tests if the
> probe fails. Document the packet paths to each test section so the
> route taken by the traffic is clear.
>
> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
> [snip]
> +# Set up an unreachable route on a router so that a lookup of the next SID
> +# fails under End, while End.X still forwards via its adjacency (nh6).
> +# args:
> +#  $1 - router to configure
> +#  $2 - adjacent router, or a NEXT-C-SID node list (e.g. "4" or "4>2,2>h")
> +#  $3 - flavors <op> of the element (e.g. "psp" or "next-csid,psp")
> +setup_rt_unreachable()
> +{
> +	local rt="$1"
> +	local adj="$2"
> +	local op_type="$3"
> [snip]
> +	case "${op_type}" in
> +	"psp")
> +		sid="$(get_rt_sid "${adj}" "psp" "End.X" "${ENDX_PSP_FUNC}")"
> +		;;
> [snip]
> +setup_endx_flv_psp()
> +{
> [snip]
> +	# (i.a) add fcff:4::2af1 unreachable on rt-3 and fcff:2::0af1 on rt-4
> +	# (i.c) add fcbb:0:42a9:20a9:: unreachable on rt-3 and fcbb:0:20a9::
> +	#       on rt-4
> +	setup_rt_unreachable 3 "4>2" "psp"
> +	setup_rt_unreachable 4 "2>h" "psp"
> +	setup_rt_unreachable 3 "4>2,2>h" "next-csid,psp"
> +	setup_rt_unreachable 4 "2>h" "next-csid,psp"

The $2 line of the comment looks like a leftover from v5: it still
says "adjacent router" and gives "4" as an example, while $2 is now
the node ID of the next SID as the policy writes it, e.g. "4>2"
(fcff:4::2af1). "4" gives fcff:4::af1, so a new call that passes "4"
instead of "4>2" would not catch an End.X that falls back to End. The
calls above already pass "4>2" and "2>h", so the test itself is fine.
Sashiko flagged the $2 line too. Maybe something like:

#  $2 - node ID of the next SID, as in the policy, or a NEXT-C-SID
#       node list (e.g. "4>2" or "4>2,2>h")

Could you please fix this comment in a v7? It is a small change in the
comment, and it avoids a separate follow-up just for this. The rest of
the patch looks good to me.

Many thanks,
Andrea

      reply	other threads:[~2026-12-05  4:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  8:46 [PATCH net-next v6 0/6] seg6: add End.X PSP flavor support and selftests Hangbin Liu
2026-12-02  8:46 ` [PATCH net-next v6 1/6] seg6: split final End process out of flavor processing Hangbin Liu
2026-12-02  8:46 ` [PATCH net-next v6 2/6] seg6: add RFC8986 flavor support for End.X Hangbin Liu
2026-12-02  8:46 ` [PATCH net-next v6 3/6] selftests: seg6: move SRv6 End PSP setup into its own helper Hangbin Liu
2026-12-05  3:20   ` Andrea Mayer
2026-12-02  8:46 ` [PATCH net-next v6 4/6] selftests: seg6: explicit cleanup for SRv6 End PSP test Hangbin Liu
2026-12-05  3:30   ` Andrea Mayer
2026-12-02  8:46 ` [PATCH net-next v6 5/6] selftests: seg6: verify PSP flavor on the installed probe route Hangbin Liu
2026-12-05  4:16   ` Andrea Mayer
2026-12-02  8:46 ` [PATCH net-next v6 6/6] selftests: seg6: add PSP flavor testing for SRv6 End.X Hangbin Liu
2026-12-05  4:25   ` Andrea Mayer [this message]

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=20261205052537.7b1e603d74bc9cba165a2818@uniroma2.it \
    --to=andrea.mayer@uniroma2.it \
    --cc=andrea@common-net.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hangbin.liu@linux.dev \
    --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®