selftests: drv-net: split up gro.py
Subsystems (3)
Jakub Kicinski
maintainercover selftests: drv-net: split up gro.py
gro.py runs its full set of cases three times over - against SW GRO, HW GRO and LRO. It's our test with the longest runtime. The 318 cases take 12m30s on mlx5 with a debug kernel.
We will likely add more subcases here as the time goes on, so it's time to start splitting it up. Long runtime wastes time on retries (if any of the 300+ cases fails we try to check if it's a real failure or flake an re-run the whole thing). It also forces us to increase timeout for the whole test suite.
Jakub Kicinski (3):
selftests: drv-net: hw: rename gro_hw.py to gro_stats.py
selftests: drv-net: split gro.py into one test per coalescing mode
selftests: drv-net: bump the timeout to 15min
tools/testing/selftests/drivers/net/Makefile | 9 ++-
.../testing/selftests/drivers/net/hw/Makefile | 2 +-
tools/testing/selftests/drivers/net/gro_hw.py | 14 ++++
.../drivers/net/{gro.py => gro_lib.py} | 68 +++++++++----------
.../testing/selftests/drivers/net/gro_lro.py | 15 ++++
tools/testing/selftests/drivers/net/gro_sw.py | 14 ++++
.../net/hw/{gro_hw.py => gro_stats.py} | 0
.../selftests/drivers/net/pppoe_gro.py | 46 +++++++++++++
tools/testing/selftests/drivers/net/settings | 2 +-
.../selftests/net/lib/ksft_setup_loopback.sh | 2 +-
10 files changed, 131 insertions(+), 41 deletions(-)
create mode 100755 tools/testing/selftests/drivers/net/gro_hw.py
rename tools/testing/selftests/drivers/net/{gro.py => gro_lib.py} (92%)
mode change 100755 => 100644
create mode 100755 tools/testing/selftests/drivers/net/gro_lro.py
create mode 100755 tools/testing/selftests/drivers/net/gro_sw.py
rename tools/testing/selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} (100%)
create mode 100755 tools/testing/selftests/drivers/net/pppoe_gro.pySignature · 1 line
2.55.0
Jakub Kicinski
maintainerPATCH 1/3 selftests: drv-net: hw: rename gro_hw.py to gro_stats.py
We need to free up the gro_hw.py name for the HW-GRO half of gro.py, which we need to split by mode (sw / hw / lro). The file checks mostly qstat counters, so name it after stats.
---
tools/testing/selftests/drivers/net/hw/Makefile | 2 +-
.../selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename tools/testing/selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} (100%)tools/testing/selftests/drivers/net/hw/Makefile +1 -1
@@ -27,7 +27,7 @@ TEST_PROGS = \ ethtool_mm.sh \ ethtool_rmon.sh \ ethtool_std_stats.sh \ - gro_hw.py \ + gro_stats.py \ hw_stats_l3.sh \ hw_stats_l3_gre.sh \ iou-zcrx.py \
tools/testing/selftests/drivers/net/hw/gro_stats.py renamed from tools/testing/selftests/drivers/net/hw/gro_hw.py +0 -0
Signature · 1 line
2.55.0
Re: [PATCH net-next 1/3] selftests: drv-net: hw: rename gro_hw.py to gro_stats.py
Quoted 10 lines · Jakub Kicinski
We need to free up the
gro_hw.pyname for the HW-GRO half ofgro.py, which we need to split by mode (sw / hw / lro). The file checks mostly qstat counters, so name it after stats.Signed-off-by Jakub Kicinski <[email protected]>--- tools/testing/selftests/drivers/net/hw/Makefile | 2 +- .../selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tools/testing/selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} (100%)
Jakub Kicinski
maintainerPATCH 2/3 selftests: drv-net: split gro.py into one test per coalescing mode
In reply to Jakub Kicinskigro.py runs its full set of cases three times over - against SW GRO, HW GRO and LRO. It's our test with the longest runtime. The 318 cases take 12m30s on mlx5 with a debug kernel.
Bumping the timeout for all tests feels wrong when we can so easily split the GRO test by execution mode. Shorter runtime also helps retry just the failing portion / mode (we retry failing tests to try to detect flakes vs real failures).
Move the main logic to gro_lib.py and add one program per mode - gro_sw.py, gro_hw.py and gro_lro.py, 102 cases each. Move PPPoE to a dedicated test. It has been tacked onto the tests in an ugly way, and it only runs against SW GRO anyway.
Note that unfortunately this will case a rename of all test cases. The mode moves from the case name to the test name
gro.py test.sw_ipv4_data_same
becomes
gro_sw.py test.ipv4_data_same
---
We also saw 20min runs on gve, but those may have been errors. The GVE runner is very flaky and even when it runs it doesn't seem to execute the gro test. Perhaps because the test times out?
---
tools/testing/selftests/drivers/net/Makefile | 9 ++-
tools/testing/selftests/drivers/net/gro_hw.py | 14 ++++
.../drivers/net/{gro.py => gro_lib.py} | 68 +++++++++----------
.../testing/selftests/drivers/net/gro_lro.py | 15 ++++
tools/testing/selftests/drivers/net/gro_sw.py | 14 ++++
.../selftests/drivers/net/pppoe_gro.py | 46 +++++++++++++
.../selftests/net/lib/ksft_setup_loopback.sh | 2 +-
7 files changed, 129 insertions(+), 39 deletions(-)
create mode 100755 tools/testing/selftests/drivers/net/gro_hw.py
rename tools/testing/selftests/drivers/net/{gro.py => gro_lib.py} (92%)
mode change 100755 => 100644
create mode 100755 tools/testing/selftests/drivers/net/gro_lro.py
create mode 100755 tools/testing/selftests/drivers/net/gro_sw.py
create mode 100755 tools/testing/selftests/drivers/net/pppoe_gro.pytools/testing/selftests/drivers/net/Makefile +8 -1
@@ -11,13 +11,16 @@ TEST_GEN_FILES := \ # end of TEST_GEN_FILES TEST_PROGS := \ - gro.py \ + gro_hw.py \ + gro_lro.py \ + gro_sw.py \ hds.py \ macsec.py \ napi_id.py \ napi_threaded.py \ netpoll_basic.py \ ping.py \ + pppoe_gro.py \ psp.py \ queues.py \ ring_reconfig.py \
@@ -27,6 +30,10 @@ TEST_PROGS := \ xdp.py \ # end of TEST_PROGS +TEST_FILES := \ + gro_lib.py \ +# end of TEST_FILES + # YNL files, must be before "include ..lib.mk" YNL_GEN_FILES := psp_responder TEST_GEN_FILES += $(YNL_GEN_FILES)
tools/testing/selftests/drivers/net/gro_hw.py new file +14 -0
@@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0 + +""" +GRO conformance tests against the HW GRO implementation (rx-gro-hw). + +See gro_lib.py for the list of test cases. +""" + +from gro_lib import gro_main + + +if __name__ == "__main__": + gro_main(__file__, "hw")
tools/testing/selftests/drivers/net/gro_lib.py renamed from tools/testing/selftests/drivers/net/gro.py +31 -37
111 lines not on this page · raw message
tools/testing/selftests/drivers/net/gro_lro.py new file +15 -0
@@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0 + +""" +GRO conformance tests against the LRO implementation +(large-receive-offload). + +See gro_lib.py for the list of test cases. +""" + +from gro_lib import gro_main + + +if __name__ == "__main__": + gro_main(__file__, "lro")
tools/testing/selftests/drivers/net/gro_sw.py new file +14 -0
@@ -0,0 +1,14 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: GPL-2.0 + +""" +GRO conformance tests against the SW GRO implementation. + +See gro_lib.py for the list of test cases. +""" + +from gro_lib import gro_main + + +if __name__ == "__main__": + gro_main(__file__, "sw")
tools/testing/selftests/drivers/net/pppoe_gro.py new file +46 -0
46 lines not on this page · raw message
tools/testing/selftests/net/lib/ksft_setup_loopback.sh +1 -1
@@ -12,7 +12,7 @@ # # Example use: # export NETIF=eth0 -# ./net/lib/ksft_setup_loopback.sh ./drivers/net/gro.py +# ./net/lib/ksft_setup_loopback.sh ./drivers/net/gro_sw.py if [ -z "$NETIF" ]; then echo "Error: NETIF variable not set"
Signature · 1 line
2.55.0
Re: [PATCH net-next 2/3] selftests: drv-net: split gro.py into one test per coalescing mode
Quoted 28 lines · Jakub Kicinski
gro.pyruns its full set of cases three times over - against SW GRO, HW GRO and LRO. It's our test with the longest runtime. The 318 cases take 12m30s on mlx5 with a debug kernel.Bumping the timeout for all tests feels wrong when we can so easily split the GRO test by execution mode. Shorter runtime also helps retry just the failing portion / mode (we retry failing tests to try to detect flakes vs real failures).
Move the main logic to
gro_lib.pyand add one program per mode -gro_sw.py,gro_hw.pyandgro_lro.py, 102 cases each. Move PPPoE to a dedicated test. It has been tacked onto the tests in an ugly way, and it only runs against SW GRO anyway.Note that unfortunately this will case a rename of all test cases. The mode moves from the case name to the test name
gro.pytest.sw_ipv4_data_samebecomes
gro_sw.pytest.ipv4_data_sameSigned-off-by Jakub Kicinski <[email protected]>---
We also saw 20min runs on gve, but those may have been errors. The GVE runner is very flaky and even when it runs it doesn't seem to execute the gro test. Perhaps because the test times out?
Quoted 16 lines
---
tools/testing/selftests/drivers/net/Makefile | 9 ++-
tools/testing/selftests/drivers/net/gro_hw.py | 14 ++++
.../drivers/net/{gro.py => gro_lib.py} | 68 +++++++++----------
.../testing/selftests/drivers/net/gro_lro.py | 15 ++++
tools/testing/selftests/drivers/net/gro_sw.py | 14 ++++
.../selftests/drivers/net/pppoe_gro.py | 46 +++++++++++++
.../selftests/net/lib/ksft_setup_loopback.sh | 2 +-
7 files changed, 129 insertions(+), 39 deletions(-)
create mode 100755 tools/testing/selftests/drivers/net/gro_hw.py
rename tools/testing/selftests/drivers/net/{gro.py => gro_lib.py} (92%)
mode change 100755 => 100644
create mode 100755 tools/testing/selftests/drivers/net/gro_lro.py
create mode 100755 tools/testing/selftests/drivers/net/gro_sw.py
create mode 100755 tools/testing/selftests/drivers/net/pppoe_gro.pyJakub Kicinski
maintainerRe: [PATCH net-next 2/3] selftests: drv-net: split gro.py into one test per coalescing mode
In reply to Jakub Kicinskitools/testing/selftests/drivers/net/pppoe_gro.py line 15
Quoted 3 lines · On Mon, 31 Aug 2026 09:37:33 -0700 Jakub Kicinski wrote:
tools/testing/selftests/drivers/net/pppoe_gro.py new file +3
-0+from lib.py import ksft_run, ksft_exit, ksft_variants +from lib.py import NetDrvEpEnv +from gro_lib import run_test
ruff is nit picking on the order of imports here, I'll have to respin, sorry about that..
Signature · 1 line
pw-bot: cr
Jakub Kicinski
maintainerPATCH 3/3 selftests: drv-net: bump the timeout to 15min
In reply to Jakub KicinskiThe XDP test takes 9m30s on the slowest NIC with debug kernel. Let's give ourselves a 50% margin and set the timeout to 15min.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- tools/testing/selftests/drivers/net/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/settings +1 -1
@@ -1 +1 @@ -timeout=360 +timeout=900
Signature · 1 line
2.55.0
Re: [PATCH net-next 3/3] selftests: drv-net: bump the timeout to 15min
Quoted 12 lines · Jakub Kicinski
The XDP test takes 9m30s on the slowest NIC with debug kernel. Let's give ourselves a 50% margin and set the timeout to 15min.
Signed-off-by Jakub Kicinski <[email protected]>---
CC: [email protected]
CC: [email protected]
CC: [email protected]--- tools/testing/selftests/drivers/net/settings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 25 lines · Jakub Kicinski
gro.pyruns its full set of cases three times over - against SW GRO, HW GRO and LRO. It's our test with the longest runtime. The 318 cases take 12m30s on mlx5 with a debug kernel.We will likely add more subcases here as the time goes on, so it's time to start splitting it up. Long runtime wastes time on retries (if any of the 300+ cases fails we try to check if it's a real failure or flake an re-run the whole thing). It also forces us to increase timeout for the whole test suite.
Jakub Kicinski (3):
selftests: drv-net: hw: renamegro_hw.pytogro_stats.py
selftests: drv-net: splitgro.pyinto one test per coalescing mode
selftests: drv-net: bump the timeout to 15mintools/testing/selftests/drivers/net/Makefile | 9 ++- .../testing/selftests/drivers/net/hw/Makefile | 2 +- tools/testing/selftests/drivers/net/gro_hw.py | 14 ++++ .../drivers/net/{gro.py => gro_lib.py} | 68 +++++++++---------- .../testing/selftests/drivers/net/gro_lro.py | 15 ++++ tools/testing/selftests/drivers/net/gro_sw.py | 14 ++++ .../net/hw/{gro_hw.py => gro_stats.py} | 0 .../selftests/drivers/net/pppoe_gro.py | 46 +++++++++++++ tools/testing/selftests/drivers/net/settings | 2 +- .../selftests/net/lib/ksft_setup_loopback.sh | 2 +-
Quoted 9 lines
10 files changed, 131 insertions(+), 41 deletions(-)
create mode 100755 tools/testing/selftests/drivers/net/gro_hw.py
rename tools/testing/selftests/drivers/net/{gro.py => gro_lib.py} (92%)
mode change 100755 => 100644
create mode 100755 tools/testing/selftests/drivers/net/gro_lro.py
create mode 100755 tools/testing/selftests/drivers/net/gro_sw.py
rename tools/testing/selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} (100%)
create mode 100755 tools/testing/selftests/drivers/net/pppoe_gro.pyFor the series:
Willem de Bruijn
Reviewed-byQuoted 36 lines · Nimrod Oren
Quoted 25 lines · Jakub Kicinski
gro.pyruns its full set of cases three times over - against SW GRO, HW GRO and LRO. It's our test with the longest runtime. The 318 cases take 12m30s on mlx5 with a debug kernel.We will likely add more subcases here as the time goes on, so it's time to start splitting it up. Long runtime wastes time on retries (if any of the 300+ cases fails we try to check if it's a real failure or flake an re-run the whole thing). It also forces us to increase timeout for the whole test suite.
Jakub Kicinski (3):
selftests: drv-net: hw: renamegro_hw.pytogro_stats.py
selftests: drv-net: splitgro.pyinto one test per coalescing mode
selftests: drv-net: bump the timeout to 15mintools/testing/selftests/drivers/net/Makefile | 9 ++- .../testing/selftests/drivers/net/hw/Makefile | 2 +- tools/testing/selftests/drivers/net/gro_hw.py | 14 ++++ .../drivers/net/{gro.py => gro_lib.py} | 68 +++++++++---------- .../testing/selftests/drivers/net/gro_lro.py | 15 ++++ tools/testing/selftests/drivers/net/gro_sw.py | 14 ++++ .../net/hw/{gro_hw.py => gro_stats.py} | 0 .../selftests/drivers/net/pppoe_gro.py | 46 +++++++++++++ tools/testing/selftests/drivers/net/settings | 2 +- .../selftests/net/lib/ksft_setup_loopback.sh | 2 +-Quoted 9 lines
10 files changed, 131 insertions(+), 41 deletions(-) create mode 100755 tools/testing/selftests/drivers/net/gro_hw.py rename tools/testing/selftests/drivers/net/{gro.py => gro_lib.py} (92%) mode change 100755 => 100644 create mode 100755 tools/testing/selftests/drivers/net/gro_lro.py create mode 100755 tools/testing/selftests/drivers/net/gro_sw.py rename tools/testing/selftests/drivers/net/hw/{gro_hw.py => gro_stats.py} (100%) create mode 100755 tools/testing/selftests/drivers/net/pppoe_gro.py
Quoted 3 lines
For the series:
Reviewed-by Nimrod Oren <[email protected]>
For the series: