* [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups
@ 2026-07-22 12:38 Gal Pressman
2026-07-22 17:20 ` Bobby Eshleman
2026-07-22 20:26 ` Jakub Kicinski
0 siblings, 2 replies; 3+ messages in thread
From: Gal Pressman @ 2026-07-22 12:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, netdev
Cc: Shuah Khan, Andy Gospodarek, Pavan Chebbi, Michael Chan,
linux-kselftest, Gal Pressman, Nimrod Oren
test_rss_context_persist_ifupdown() cycles the interface down/up and
pings the remote host before verifying the contexts survived.
When using IPv6, the down operation deletes the configured IPv6 address
(default keep_addr_on_down=0) and nothing restores it after the up, so
all ping attempts fail and both tests skip with "Cannot reach remote
host after interface up".
Set the interface's keep_addr_on_down sysctl around the flap to retain
the address.
Fixes: ce5a0f4612db ("selftests: drv-net: rss_ctx: test RSS contexts persist after ifdown/up")
Reviewed-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
---
Disclaimer: I'm not sure if this should go to net or net-next.
---
| 7 +++++++
1 file changed, 7 insertions(+)
--git a/tools/testing/selftests/drivers/net/hw/rss_ctx.py b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
index f36f76d6ca59..eeea2fb292ac 100755
--- a/tools/testing/selftests/drivers/net/hw/rss_ctx.py
+++ b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
@@ -938,6 +938,13 @@ def test_rss_context_persist_ifupdown(cfg, pre_down=False):
ethtool(f"-X {cfg.ifname} equal 2")
defer(ethtool, f"-X {cfg.ifname} default")
+ # IPv6 addresses are deleted on admin down and not restored on up
+ knob = f"net/ipv6/conf/{cfg.ifname}/keep_addr_on_down"
+ probe = cmd(f"sysctl -n {knob}", fail=False)
+ if probe.ret == 0:
+ cmd(f"sysctl -qw {knob}=1")
+ defer(cmd, f"sysctl -qw {knob}={probe.stdout.strip()}")
+
ifup = defer(ip, f"link set dev {cfg.ifname} up")
if pre_down:
ip(f"link set dev {cfg.ifname} down")
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups
2026-07-22 12:38 [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups Gal Pressman
@ 2026-07-22 17:20 ` Bobby Eshleman
2026-07-22 20:26 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Bobby Eshleman @ 2026-07-22 17:20 UTC (permalink / raw)
To: Gal Pressman
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, netdev, Shuah Khan, Andy Gospodarek, Pavan Chebbi,
Michael Chan, linux-kselftest, Nimrod Oren
On Wed, Jul 22, 2026 at 03:38:44PM +0300, Gal Pressman wrote:
> test_rss_context_persist_ifupdown() cycles the interface down/up and
> pings the remote host before verifying the contexts survived.
>
> When using IPv6, the down operation deletes the configured IPv6 address
> (default keep_addr_on_down=0) and nothing restores it after the up, so
> all ping attempts fail and both tests skip with "Cannot reach remote
> host after interface up".
>
> Set the interface's keep_addr_on_down sysctl around the flap to retain
> the address.
>
> Fixes: ce5a0f4612db ("selftests: drv-net: rss_ctx: test RSS contexts persist after ifdown/up")
> Reviewed-by: Nimrod Oren <noren@nvidia.com>
> Signed-off-by: Gal Pressman <gal@nvidia.com>
> ---
> Disclaimer: I'm not sure if this should go to net or net-next.
> ---
> tools/testing/selftests/drivers/net/hw/rss_ctx.py | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/testing/selftests/drivers/net/hw/rss_ctx.py b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> index f36f76d6ca59..eeea2fb292ac 100755
> --- a/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> +++ b/tools/testing/selftests/drivers/net/hw/rss_ctx.py
> @@ -938,6 +938,13 @@ def test_rss_context_persist_ifupdown(cfg, pre_down=False):
> ethtool(f"-X {cfg.ifname} equal 2")
> defer(ethtool, f"-X {cfg.ifname} default")
>
> + # IPv6 addresses are deleted on admin down and not restored on up
> + knob = f"net/ipv6/conf/{cfg.ifname}/keep_addr_on_down"
> + probe = cmd(f"sysctl -n {knob}", fail=False)
> + if probe.ret == 0:
> + cmd(f"sysctl -qw {knob}=1")
> + defer(cmd, f"sysctl -qw {knob}={probe.stdout.strip()}")
> +
> ifup = defer(ip, f"link set dev {cfg.ifname} up")
> if pre_down:
> ip(f"link set dev {cfg.ifname} down")
> --
> 2.54.0
>
Makes sense to me.
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups
2026-07-22 12:38 [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups Gal Pressman
2026-07-22 17:20 ` Bobby Eshleman
@ 2026-07-22 20:26 ` Jakub Kicinski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-07-22 20:26 UTC (permalink / raw)
To: Gal Pressman
Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Andrew Lunn, netdev,
Shuah Khan, Andy Gospodarek, Pavan Chebbi, Michael Chan,
linux-kselftest, Nimrod Oren
On Wed, 22 Jul 2026 15:38:44 +0300 Gal Pressman wrote:
> test_rss_context_persist_ifupdown() cycles the interface down/up and
> pings the remote host before verifying the contexts survived.
This is expected to be configured on the system where tests run, without
sprinkling it in every tests. See the env setup scripts in NIPA repo for
example.
--
pw-bot: reject
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-22 20:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 12:38 [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups Gal Pressman
2026-07-22 17:20 ` Bobby Eshleman
2026-07-22 20:26 ` Jakub Kicinski
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.