From: Bobby Eshleman <bobbyeshleman@gmail.com>
To: Gal Pressman <gal@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
Andy Gospodarek <andrew.gospodarek@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Michael Chan <michael.chan@broadcom.com>,
linux-kselftest@vger.kernel.org, Nimrod Oren <noren@nvidia.com>
Subject: Re: [PATCH net] selftests: drv-net: rss_ctx: fix persist tests skip on IPv6 setups
Date: Wed, 22 Jul 2026 10:20:07 -0700 [thread overview]
Message-ID: <amD7xzvgFwnlUj2S@devvm29614.prn0.facebook.com> (raw)
In-Reply-To: <20260722123844.1673299-1-gal@nvidia.com>
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>
prev parent reply other threads:[~2026-07-22 17:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [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=amD7xzvgFwnlUj2S@devvm29614.prn0.facebook.com \
--to=bobbyeshleman@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=noren@nvidia.com \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.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