* [PATCH net] selftests: drv-net: ping: Wait for carrier after toggling offloads
@ 2026-03-18 1:01 Pin-yen Lin
2026-03-19 0:28 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Pin-yen Lin @ 2026-03-18 1:01 UTC (permalink / raw)
To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Shuah Khan, Taehee Yoo
Cc: linux-kernel, linux-kselftest, netdev, Pin-yen Lin
Toggling checksum offload (or HW-GRO via feature dependencies) can cause
certain physical interfaces to undergo a reset or a temporary link-down
state. In the ping.py test, this leads to immediate test failures if the
ping is attempted before the carrier is restored.
This is observed when running the test with GVE driver when HW-GRO is
enabled. When checksum offload is toggled, HW-GRO is toggled as well
because of the feature dependency. This leads to an interface reset,
causing the subsequent ping to fail.
Add a sleep period after changing these features to allow the link to
stabilize.
Fixes: 75cc19c8ff89 ("selftests: drv-net: add xdp cases for ping.py")
Signed-off-by: Pin-yen Lin <treapking@google.com>
---
tools/testing/selftests/drivers/net/ping.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py
index da3623c5e8a9..951cd99136c3 100755
--- a/tools/testing/selftests/drivers/net/ping.py
+++ b/tools/testing/selftests/drivers/net/ping.py
@@ -64,7 +64,10 @@ def _set_offload_checksum(cfg, netnl, on) -> None:
try:
ethtool(f" -K {cfg.ifname} rx {on} tx {on} ")
except:
- return
+ pass
+
+ if no_sleep != True:
+ time.sleep(10)
def _set_xdp_generic_sb_on(cfg) -> None:
prog = cfg.net_lib_dir / "xdp_dummy.bpf.o"
--
2.53.0.851.ga537e3e6e9-goog
base-commit: 64dcbde7f8f870a4f2d9daf24ffb06f9748b5dd3
branch: net-upstream
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] selftests: drv-net: ping: Wait for carrier after toggling offloads
2026-03-18 1:01 [PATCH net] selftests: drv-net: ping: Wait for carrier after toggling offloads Pin-yen Lin
@ 2026-03-19 0:28 ` Jakub Kicinski
2026-03-19 0:51 ` Pin-yen Lin
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2026-03-19 0:28 UTC (permalink / raw)
To: Pin-yen Lin
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
Shuah Khan, Taehee Yoo, linux-kernel, linux-kselftest, netdev,
Willem de Bruijn
On Tue, 17 Mar 2026 18:01:17 -0700 Pin-yen Lin wrote:
> Toggling checksum offload (or HW-GRO via feature dependencies) can cause
> certain physical interfaces to undergo a reset or a temporary link-down
> state. In the ping.py test, this leads to immediate test failures if the
> ping is attempted before the carrier is restored.
>
> This is observed when running the test with GVE driver when HW-GRO is
> enabled. When checksum offload is toggled, HW-GRO is toggled as well
> because of the feature dependency. This leads to an interface reset,
> causing the subsequent ping to fail.
>
> Add a sleep period after changing these features to allow the link to
> stabilize.
Sounds like the test found a legitimate problem. The configuration
should not return to user space until the operation has completed.
User should not have to sleep 10sec each time they touch NIC
configuration.
--
pw-bot: reject
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] selftests: drv-net: ping: Wait for carrier after toggling offloads
2026-03-19 0:28 ` Jakub Kicinski
@ 2026-03-19 0:51 ` Pin-yen Lin
2026-03-19 1:25 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Pin-yen Lin @ 2026-03-19 0:51 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
Shuah Khan, Taehee Yoo, linux-kernel, linux-kselftest, netdev,
Willem de Bruijn
Hi Jakub,
Thanks for the review.
On Wed, Mar 18, 2026 at 5:28 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 17 Mar 2026 18:01:17 -0700 Pin-yen Lin wrote:
> > Toggling checksum offload (or HW-GRO via feature dependencies) can cause
> > certain physical interfaces to undergo a reset or a temporary link-down
> > state. In the ping.py test, this leads to immediate test failures if the
> > ping is attempted before the carrier is restored.
> >
> > This is observed when running the test with GVE driver when HW-GRO is
> > enabled. When checksum offload is toggled, HW-GRO is toggled as well
> > because of the feature dependency. This leads to an interface reset,
> > causing the subsequent ping to fail.
> >
> > Add a sleep period after changing these features to allow the link to
> > stabilize.
>
> Sounds like the test found a legitimate problem. The configuration
> should not return to user space until the operation has completed.
> User should not have to sleep 10sec each time they touch NIC
> configuration.
To clarify, the configuration operation itself completes before
returning to userspace. However, the short link-down during the
configuration triggers asynchronous systemd events. These userspace
operations affect the subsequent pings. Sorry for not making this
clear in the commit message.
Regarding the 10s delay: I agree it is long. In my environment, the
interface stabilizes in under 1s. I chose 10s only to maintain
consistency with existing delays in this test script. I'm happy to
reduce this to a smaller value (say, 3s) in v2.
Regards,
Pin-yen
>
> --
> pw-bot: reject
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] selftests: drv-net: ping: Wait for carrier after toggling offloads
2026-03-19 0:51 ` Pin-yen Lin
@ 2026-03-19 1:25 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2026-03-19 1:25 UTC (permalink / raw)
To: Pin-yen Lin
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni,
Shuah Khan, Taehee Yoo, linux-kernel, linux-kselftest, netdev,
Willem de Bruijn
On Wed, 18 Mar 2026 17:51:11 -0700 Pin-yen Lin wrote:
> > On Tue, 17 Mar 2026 18:01:17 -0700 Pin-yen Lin wrote:
> > > Toggling checksum offload (or HW-GRO via feature dependencies) can cause
> > > certain physical interfaces to undergo a reset or a temporary link-down
> > > state. In the ping.py test, this leads to immediate test failures if the
> > > ping is attempted before the carrier is restored.
> > >
> > > This is observed when running the test with GVE driver when HW-GRO is
> > > enabled. When checksum offload is toggled, HW-GRO is toggled as well
> > > because of the feature dependency. This leads to an interface reset,
> > > causing the subsequent ping to fail.
> > >
> > > Add a sleep period after changing these features to allow the link to
> > > stabilize.
> >
> > Sounds like the test found a legitimate problem. The configuration
> > should not return to user space until the operation has completed.
> > User should not have to sleep 10sec each time they touch NIC
> > configuration.
>
> To clarify, the configuration operation itself completes before
> returning to userspace. However, the short link-down during the
> configuration triggers asynchronous systemd events. These userspace
> operations affect the subsequent pings. Sorry for not making this
> clear in the commit message.
Can we somehow avoid / suppress this systemd behavior as part of
(your local) environment setup? Each environment will have some
setups steps. We assume that DAD is disabled, IPv6 addresses are
not flushed on ifdown, of course no firewalls..
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-19 1:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 1:01 [PATCH net] selftests: drv-net: ping: Wait for carrier after toggling offloads Pin-yen Lin
2026-03-19 0:28 ` Jakub Kicinski
2026-03-19 0:51 ` Pin-yen Lin
2026-03-19 1:25 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox