From: netdev-bot+sashiko@kernel.org
To: hangbin.liu@linux.dev
Cc: andrea.mayer@uniroma2.it, andrea@common-net.org,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, shuah@kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, liuhangbin@kylinos.cn
Subject: Re: [PATCH net-next v4 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X
Date: Mon, 23 Nov 2026 14:24:07 +0000 [thread overview]
Message-ID: <179544384743.3135.16053596947905097199@kernel.org> (raw)
In-Reply-To: <20261119-srv6_flavors_endx-v4-5-284cdb484eee@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 2
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] test_kernel_supp_or_ksft_skip() in
tools/testing/selftests/net/srv6_end_flavors_test.sh is now also used…
- [Low] The commit message does not describe several changes accurately.
- [Low] The comment above __get_srv6_rtcfg_id() gives the example element
"1>2,2>3:psp:End.".
--
selftests: seg6: add PSP flavor testing for SRv6 End.X
This commit adds an End.X scenario to srv6_end_flavors_test.sh. The new
scenario reuses the End PSP and NEXT-C-SID,PSP policies, with every SID
bound through an adjacency. It teaches the policy helpers to parse
<nodeid:op:act> elements, adds a consumed-SRH test for End.X, and checks
kernel support for End.X PSP before running the new tests.
> Add the packet path to each test section so the route taken by the
> traffic is clear.
[Severity: Low]
Is this description accurate? The Path: lines only go into the header
comment block that documents the policies. The TEST SECTION output that
log_section() prints at runtime does not show any path.
The commit message also leaves out two changes to existing End code.
First, the existing End section titles are renamed:
host_srv6_end_flv_psp_tests():
log_section "SRv6 connectivity test hosts (h1 <-> h2, ${act} PSP flavor)"
host_srv6_end_flv_next_csid_psp_tests():
log_section "SRv6 connectivity test hosts (h1 <-> h2, ${act} NEXT-C-SID,PSP)"
host_srv6_end_flv_consumed_srh_tests():
"SRv6 connectivity test hosts (h1 <-> h2, End PSP with a consumed SRH)"
Second, LCNODE_FMT ("%x0") is removed, so build_csid() now prints the node
ID with %s instead of %x:
printf "%s%s%s" "${node}" "${adj}" "${func}"
For router IDs 1-4 the output is the same.
Could the commit message mention these changes?
> diff --git a/tools/testing/selftests/net/srv6_end_flavors_test.sh b/tools/testing/selftests/net/srv6_end_flavors_test.sh
> index 9d6b7de648da3..d7fdc4e19da9e 100755
> --- a/tools/testing/selftests/net/srv6_end_flavors_test.sh
> +++ b/tools/testing/selftests/net/srv6_end_flavors_test.sh
[ ... ]
> @@ -535,10 +570,12 @@ get_network_prefix()
> echo "${IPv6_RT_NETWORK}:${p}:${q}"
> }
>
> -# Given the description of a router <id:op> as an input, the function returns
> -# the <id> token which represents the ID of the router.
> -# i.e. input: "12:psp"
> -# output: "12"
> +# Given the description of a router <id:op:act> as an input, the function
> +# returns its <id> field with the <op> and <act> fields dropped.
> +# i.e. input: "12:psp", output: "12"
> +# input: "1,2:psp", output: "1,2"
> +# input: "1>2:psp", output: "1>2"
> +# input: "1>2,2>3:psp:End.", output: "1>2,2>3"
[Severity: Low]
This isn't a bug, but should "End." be "End.X" here? __setup_rt_policy()
in this same patch would reject the documented element:
if [[ "${n}" == *">"* && "${n}" != *"End.X"* ]] || \
[[ "${n}" != *">"* && "${n}" == *"End.X"* ]]; then
echo "Incorrect operation format: ${n}" && false
fi
Neither __get_func() nor __get_srv6_act_cfg() has a case for "End." either.
[ ... ]
> @@ -1336,12 +1549,19 @@ test_iproute2_supp_or_ksft_skip()
> fi
> }
>
> +# exit directly if End action not supported, otherwise return 1
> test_kernel_supp_or_ksft_skip()
> {
> - local flavor="$1"
> + local action="$1"
> + local flavor="$2"
> local test_netns
> + local policy=()
>
> test_netns="kflv-$(mktemp -u XXXXXXXX)"
> + policy=(action "${action}" flavors "${flavor}")
> + if [ "$action" == "End.X" ]; then
> + policy+=(nh6 "${IPv6_TESTS_NH6}")
> + fi
>
> if ! ip netns add "${test_netns}"; then
> echo "SKIP: Cannot set up netns to test kernel support for flavors"
> @@ -1366,10 +1586,15 @@ test_kernel_supp_or_ksft_skip()
>
> if ! ip -netns "${test_netns}" -6 route \
> add "${IPv6_TESTS_ADDR}" encap seg6local \
> - action End flavors "${flavor}" dev "${DUMMY_DEVNAME}"; then
> - echo "SKIP: ${flavor} flavor not supported in kernel"
> + "${policy[@]}" dev "${DUMMY_DEVNAME}"; then
> + echo "SKIP: ${action} flavor ${flavor} not supported in kernel"
>
> ip netns del "${test_netns}"
> +
> + if [ "$action" != "End" ]; then
> + return 1
> + fi
> +
> exit "${ksft_skip}"
> fi
>
[Severity: Medium]
This function is now also called as a soft probe at the end of the
script:
test_end_flv
if test_kernel_supp_or_ksft_skip End.X psp; then
test_endx_flv
fi
print_log_test_results
This call runs after trap cleanup EXIT is installed. By then router_tests,
host2gateway_tests and test_end_flv have already logged results.
Only the seg6local route add branch returns 1 for End.X. The ip netns
add, dummy link add and link set up failure branches still call
exit "${ksft_skip}" for every action. Calling the function from an if
condition does not stop that exit.
If one of those steps fails here, are the earlier results lost? The exit
runs cleanup(). SETUP_ERR is already 0 after setup_end_flv_psp(), so
cleanup() reaches:
exit "${ret}"
print_log_test_results() has not run yet. If all End tests passed, ret
still holds its initial ${ksft_skip} value, so the run exits as SKIP with
no summary. If some tests failed, it exits 1, also with no summary.
The intended return 1 path (a kernel with End.X but without End.X PSP)
only echoes a SKIP line. log_test_skipped is not called, so nskip stays 0.
Does the final "Tests skipped" summary then leave out the dropped End.X
tests?
On success, the function returns the status of ip netns del. Would a
failing delete also skip test_endx_flv without any message?
The new header comment, "exit directly if End action not supported,
otherwise return 1", also doesn't describe the netns and dummy device
failure paths, which exit for every action.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119-srv6_flavors_endx-v4-0-284cdb484eee%40kylinos.cn
prev parent reply other threads:[~2026-11-23 14:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 13:55 [PATCH net-next v4 0/5] seg6: add End.X PSP flavor support and selftests Hangbin Liu
2026-11-19 13:55 ` [PATCH net-next v4 1/5] seg6: split final End process out of flavor processing Hangbin Liu
2026-11-19 13:55 ` [PATCH net-next v4 2/5] seg6: add RFC8986 flavor support for End.X Hangbin Liu
2026-11-23 14:24 ` netdev-bot+sashiko
2026-11-19 13:55 ` [PATCH net-next v4 3/5] selftests: seg6: move SRv6 End PSP setup into its own helper Hangbin Liu
2026-11-19 13:55 ` [PATCH net-next v4 4/5] selftests: seg6: explicit cleanup for SRv6 End PSP test Hangbin Liu
2026-11-19 13:55 ` [PATCH net-next v4 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X Hangbin Liu
2026-11-23 4:09 ` Andrea Mayer
2026-11-23 10:09 ` Hangbin Liu
2026-11-23 13:40 ` hangbin.liu
2026-11-23 14:24 ` netdev-bot+sashiko [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=179544384743.3135.16053596947905097199@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=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 \
/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;
as well as URLs for NNTP newsgroup(s).