| da87caba | 24-Feb-2025 |
Gal Pressman <[email protected]> |
selftests: drv-net-hw: Add a test for symmetric RSS hash
Add a selftest that verifies symmetric RSS hash is working as intended. The test runs iterations of traffic, swapping the src/dst UDP ports,
selftests: drv-net-hw: Add a test for symmetric RSS hash
Add a selftest that verifies symmetric RSS hash is working as intended. The test runs iterations of traffic, swapping the src/dst UDP ports, and verifies that the same RX queue is receiving the traffic in both cases.
Reviewed-by: Nimrod Oren <[email protected]> Signed-off-by: Gal Pressman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 4fde8398 | 19-Feb-2025 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: improve the use of ksft helpers in XSK queue test
Avoid exceptions when xsk attr is not present, and add a proper ksft helper for "not in" condition.
Acked-by: Stanislav Fomiche
selftests: drv-net: improve the use of ksft helpers in XSK queue test
Avoid exceptions when xsk attr is not present, and add a proper ksft helper for "not in" condition.
Acked-by: Stanislav Fomichev <[email protected]> Reviewed-by: Joe Damato <[email protected]> Tested-by: Kurt Kanzenbach <[email protected]> Tested-by: Joe Damato <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 46619175 | 01-Aug-2024 |
Jakub Kicinski <[email protected]> |
selftests: net: ksft: print more of the stack for checks
Print more stack frames and the failing line when check fails. This helps when tests use helpers to do the checks.
Before:
# At ./ksft/dr
selftests: net: ksft: print more of the stack for checks
Print more stack frames and the failing line when check fails. This helps when tests use helpers to do the checks.
Before:
# At ./ksft/drivers/net/hw/rss_ctx.py line 92: # Check failed 1037698 >= 396893.0 traffic on other queues:[344612, 462380, 233020, 449174, 342298] not ok 8 rss_ctx.test_rss_context_queue_reconfigure
After:
# Check| At ./ksft/drivers/net/hw/rss_ctx.py, line 387, in test_rss_context_queue_reconfigure: # Check| test_rss_queue_reconfigure(cfg, main_ctx=False) # Check| At ./ksft/drivers/net/hw/rss_ctx.py, line 230, in test_rss_queue_reconfigure: # Check| _send_traffic_check(cfg, port, ctx_ref, { 'target': (0, 3), # Check| At ./ksft/drivers/net/hw/rss_ctx.py, line 92, in _send_traffic_check: # Check| ksft_lt(sum(cnts[i] for i in params['noise']), directed / 2, # Check failed 1045235 >= 405823.5 traffic on other queues (context 1)':[460068, 351995, 565970, 351579, 127270] not ok 8 rss_ctx.test_rss_context_queue_reconfigure
Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| 8510801a | 27-Jun-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: add ability to schedule cleanup with defer()
This implements what I was describing in [1]. When writing a test author can schedule cleanup / undo actions right after the creation
selftests: drv-net: add ability to schedule cleanup with defer()
This implements what I was describing in [1]. When writing a test author can schedule cleanup / undo actions right after the creation completes, eg:
cmd("touch /tmp/file") defer(cmd, "rm /tmp/file")
defer() takes the function name as first argument, and the rest are arguments for that function. defer()red functions are called in inverse order after test exits. It's also possible to capture them and execute earlier (in which case they get automatically de-queued).
undo = defer(cmd, "rm /tmp/file") # ... some unsafe code ... undo.exec()
As a nice safety all exceptions from defer()ed calls are captured, printed, and ignored (they do make the test fail, however). This addresses the common problem of exceptions in cleanup paths often being unhandled, leading to potential leaks.
There is a global action queue, flushed by ksft_run(). We could support function level defers too, I guess, but there's no immediate need..
Link: https://lore.kernel.org/all/[email protected]/ # [1] Reviewed-by: Przemek Kitszel <[email protected]> Reviewed-by: Petr Machata <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| f898c16a | 26-Jun-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: rss_ctx: add tests for RSS configuration and contexts
Add tests focusing on indirection table configuration and creating extra RSS contexts in drivers which support it.
$ expo
selftests: drv-net: rss_ctx: add tests for RSS configuration and contexts
Add tests focusing on indirection table configuration and creating extra RSS contexts in drivers which support it.
$ export NETIF=eth0 REMOTE_... $ ./drivers/net/hw/rss_ctx.py KTAP version 1 1..8 ok 1 rss_ctx.test_rss_key_indir ok 2 rss_ctx.test_rss_context ok 3 rss_ctx.test_rss_context4 # Increasing queue count 44 -> 66 # Failed to create context 32, trying to test what we got ok 4 rss_ctx.test_rss_context32 # SKIP Tested only 31 contexts, wanted 32 ok 5 rss_ctx.test_rss_context_overlap ok 6 rss_ctx.test_rss_context_overlap2 # .. sprays traffic like a headless chicken .. not ok 7 rss_ctx.test_rss_context_out_of_order ok 8 rss_ctx.test_rss_context4_create_with_cfg # Totals: pass:6 fail:1 xfail:0 xpass:0 skip:1 error:0
Note that rss_ctx.test_rss_context_out_of_order fails with the device I tested with, but it seems to be a device / driver bug.
Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| af8e5164 | 26-Jun-2024 |
Jakub Kicinski <[email protected]> |
selftests: drv-net: add helper to wait for HW stats to sync
Some devices DMA stats to the host periodically. Add a helper which can wait for that to happen, based on frequency reported by the driver
selftests: drv-net: add helper to wait for HW stats to sync
Some devices DMA stats to the host periodically. Add a helper which can wait for that to happen, based on frequency reported by the driver in ethtool.
Reviewed-by: Petr Machata <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|