From: Hangbin Liu <hangbin.liu@linux.dev>
To: Andrea Mayer <andrea.mayer@uniroma2.it>
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>
Subject: Re: [PATCH net-next v3 3/5] selftests: seg6: move SRv6 End PSP setup into its own helper
Date: Mon, 16 Nov 2026 14:20:57 +0800 [thread overview]
Message-ID: <avqgyRcQkWLvpiA9@fedora> (raw)
In-Reply-To: <20261116052659.e8843a373807242737faeef0@uniroma2.it>
Hi Andrea,
On Mon, Nov 16, 2026 at 05:26:59AM +0100, Andrea Mayer wrote:
> > [snip]
> > diff --git a/tools/testing/selftests/net/srv6_end_flavors_test.sh b/tools/testing/selftests/net/srv6_end_flavors_test.sh
> > index 157baa8ecb0b..0ed5bfe99029 100755
> > --- a/tools/testing/selftests/net/srv6_end_flavors_test.sh
> > +++ b/tools/testing/selftests/net/srv6_end_flavors_test.sh
> > @@ -488,8 +488,9 @@ cleanup()
> >
> > # check whether the setup phase was completed successfully or not. In
> > # case of an error during the setup phase of the testing environment,
> > - # the selftest is considered as "skipped".
> > - if [ "${SETUP_ERR}" -ne 0 ]; then
> > + # the selftest is considered as "skipped", unless a test has already
> > + # recorded a failure.
> > + if [ "${SETUP_ERR}" -ne 0 ] && [ "$ret" -ne "$ksft_fail" ]; then
> > echo "SKIP: Setting up the testing environment failed"
> > exit "${ksft_skip}"
> > fi
>
> When a test has already failed and the setup then fails, the script
> exits with 1 and does not say that the setup failed. For example, with
> hs-2 -> gw failing and then an error in setup_end_flv_psp(), the last
> TEST lines in the log are:
>
> TEST: IPv6 Hosts connectivity: hs-1 -> gw [ OK ]
> TEST: IPv6 Hosts connectivity: hs-2 -> gw [FAIL]
>
> The End PSP tests did not run. Before this patch, the setup ran before
> any test, and cleanup() printed "Setting up the testing environment
> failed" on every setup error. Could cleanup() print it also in this
> case, keeping the exit code 1? Something like:
>
> if [ "${SETUP_ERR}" -ne 0 ]; then
> if [ "${ret}" -ne "${ksft_fail}" ]; then
> echo "SKIP: Setting up the testing environment failed"
> exit "${ksft_skip}"
> fi
>
> echo "FAIL: Setting up the testing environment failed"
> fi
>
> exit "${ret}"
OK, I will fix it.
> > # see __setup_rt_policy
> > @@ -962,17 +980,29 @@ setup()
> > setup_hs 1 1
> > setup_hs 2 2
> >
> > - # set up the loopback addresses of the hosts used by the Policies (i.c)
> > - # and (i.d).
> > - setup_hs_lo_addr 1 1 "${END_CSID_PSP_FUNC}"
> > - setup_hs_lo_addr 2 2 "${END_CSID_PSP_FUNC}"
> > -
> > # set up default SRv6 Endpoints (i.e. SRv6 End behavior)
> > setup_rt_local_sids 1 "2 3 4"
> > setup_rt_local_sids 2 "1 3 4"
> > setup_rt_local_sids 3 "1 2 4"
> > setup_rt_local_sids 4 "1 2 3"
> >
> > + # testing environment was set up successfully
> > + SETUP_ERR=0
> > +}
> > +
> > +setup_end_flv_psp()
> > +{
> > + SETUP_ERR=1
> > +
> > + # set up the loopback addresses of the hosts used by the Policies (i.c)
> > + # and (i.d).
> > + setup_hs_lo_addr 1 1 "${END_CSID_PSP_FUNC}"
> > + setup_hs_lo_addr 2 2 "${END_CSID_PSP_FUNC}"
> > +
> > + # setup proxy on route entries for hosts
> > + setup_rt_host_proxy 1 2 "${END_CSID_PSP_FUNC}"
> > + setup_rt_host_proxy 2 1 "${END_CSID_PSP_FUNC}"
> > +
> > # set up SRv6 policies
> > # create a connection between hosts hs-1 and hs-2.
> > # The path between hs-1 and hs-2 traverses SRv6 aware routers.
>
> Before this patch, __setup_rt_policy() added the proxy entry together
> with the route of each Policy. With this patch, each scenario calls
> setup_rt_host_proxy() instead.
>
> In this v3, 4/5 deletes the proxies when the scenario ends, like the
> routes of the Policies. So I think the proxy entry can stay in
> __setup_rt_policy(), and in 4/5 its defer can go next to the defer of
> the route. What do you think?
OK, I will keep the proxy set up in __setup_rt_policy.
Thanks
Hangbin
next prev parent reply other threads:[~2026-11-16 6:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 9:27 [PATCH net-next v3 0/5] seg6: add End.X PSP flavor support and selftests Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 1/5] seg6: split final End process out of flavor processing Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 2/5] seg6: add RFC8986 flavor support for End.X Hangbin Liu
2026-11-12 9:27 ` [PATCH net-next v3 3/5] selftests: seg6: move SRv6 End PSP setup into its own helper Hangbin Liu
2026-11-16 4:26 ` Andrea Mayer
2026-11-16 6:20 ` Hangbin Liu [this message]
2026-11-12 9:27 ` [PATCH net-next v3 4/5] selftest: seg6: explicit cleanup for SRv6 End PSP test Hangbin Liu
2026-11-16 4:34 ` Andrea Mayer
2026-11-16 6:27 ` Hangbin Liu
2026-11-16 12:29 ` netdev-bot+sashiko
2026-11-12 9:28 ` [PATCH net-next v3 5/5] selftests: seg6: add PSP flavor testing for SRv6 End.X Hangbin Liu
2026-11-16 12:29 ` netdev-bot+sashiko
2026-11-17 2:50 ` Andrea Mayer
2026-11-17 8:48 ` Hangbin Liu
2026-11-18 0:51 ` Hangbin Liu
2026-11-18 2:57 ` Andrea Mayer
2026-11-18 2:50 ` Andrea Mayer
2026-11-18 7:06 ` 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=avqgyRcQkWLvpiA9@fedora \
--to=hangbin.liu@linux.dev \
--cc=andrea.mayer@uniroma2.it \
--cc=andrea@common-net.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.