selftests: drv-net: replace the nsim ring test with a drv-net one
Subsystems (6)
Jakub Kicinski
maintainerPATCH v3 1/1 selftests: drv-net: replace the nsim ring test with a drv-net one
We are trying to move away from netdevsim-only tests and towards tests which can be run both against netdevsim and real drivers.
Replace the simple bash script we have for checking ethtool -g/-G on netdevsim with a Python test tweaking those params as well as channel count.
The new test is not exactly equivalent to the netdevsim one, but real drivers don't often support random ring sizes, let alone modifying max values via debugfs.
---
v3:
- let ring sizes fall all the way down to 0
v2: https://lore.kernel.org/[email protected]
- add the new test to Makefile and remove the old one turns out NIPA checking for Makefile presence was busted
v1: https://lore.kernel.org/[email protected]
--- tools/testing/selftests/drivers/net/Makefile | 1 + .../selftests/drivers/net/netdevsim/Makefile | 1 - .../drivers/net/netdevsim/ethtool-ring.sh | 85 --------- .../selftests/drivers/net/ring_reconfig.py | 167 ++++++++++++++++++ 4 files changed, 168 insertions(+), 86 deletions(-) delete mode 100755 tools/testing/selftests/drivers/net/netdevsim/ethtool-ring.sh create mode 100755 tools/testing/selftests/drivers/net/ring_reconfig.py
tools/testing/selftests/drivers/net/Makefile +1 -0
@@ -22,6 +22,7 @@ TEST_PROGS := \ ping.py \ psp.py \ queues.py \ + ring_reconfig.py \ shaper.py \ stats.py \ xdp.py \
tools/testing/selftests/drivers/net/netdevsim/Makefile +0 -1
@@ -8,7 +8,6 @@ TEST_PROGS := \ ethtool-features.sh \ ethtool-fec.sh \ ethtool-pause.sh \ - ethtool-ring.sh \ fib.sh \ fib_notifications.sh \ hw_stats_l3.sh \
tools/testing/selftests/drivers/net/netdevsim/ethtool-ring.sh deleted +0 -85
85 lines not on this page · raw message
tools/testing/selftests/drivers/net/ring_reconfig.py new file +167 -0
167 lines not on this page · raw message
Signature · 1 line
2.51.0
Quoted 7 lines · Jakub Kicinski
We are trying to move away from netdevsim-only tests and towards tests which can be run both against netdevsim and real drivers.
Replace the simple bash script we have for checking ethtool -g/-G on netdevsim with a Python test tweaking those params as well as channel count.
Quoted 5 lines
The new test is not exactly equivalent to the netdevsim one, but real drivers don't often support random ring sizes, let alone modifying max values via debugfs.
Signed-off-by Jakub Kicinski <[email protected]>
Andrew
Re: [External] : [PATCH net-next v3] selftests: drv-net: replace the nsim ring test with a drv-net one
In reply to Jakub Kicinskitools/testing/selftests/drivers/net/ring_reconfig.py line 18
Quoted 5 lines · Jakub Kicinski
tools/testing/selftests/drivers/net/ring_reconfig.py new file +5
-0+def channels(cfg) -> None: + """ + Twiddle channel counts in various combinations of parameters. + We're only looking for driver adhering to the requested config + if the config is accepted and crashes.
crashes.?
tools/testing/selftests/drivers/net/ring_reconfig.py line 21
Quoted 3 lines
tools/testing/selftests/drivers/net/ring_reconfig.py new file +3
-0+ """ + ehdr = {'header':{'dev-index': cfg.ifindex}} + chans = cfg.eth.channels_get(ehdr)
Thanks,
Alok
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 29 Oct 2025 09:49:30 -0700 you wrote:
We are trying to move away from netdevsim-only tests and towards tests which can be run both against netdevsim and real drivers.
Replace the simple bash script we have for checking ethtool -g/-G on netdevsim with a Python test tweaking those params as well as channel count.
[...]
Here is the summary with links:
- [net-next,v3] selftests: drv-net: replace the nsim ring test with a drv-net one
https://git.kernel.org/netdev/net-next/c/ecca75ae5ae6
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html