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 <[email protected]>
---
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