selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups
Subsystems (3)
PATCH 1/1 selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups
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.
---
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(+)
tools/testing/selftests/drivers/net/hw/rss_ctx.py +7 -0
@@ -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")
Signature · 1 line
2.54.0
Quoted 41 lines · Gal Pressman
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_downsysctl 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 <[email protected]>Signed-off-by Gal Pressman <[email protected]>---
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(+)tools/testing/selftests/drivers/net/hw/rss_ctx.py +7
-0@@ -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")Signature · 1 line
2.54.0
Makes sense to me.
Jakub Kicinski
maintainerQuoted 2 lines · 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.
Signature · 1 line
pw-bot: reject