On Tue, Feb 10, 2026 at 11:31:10AM +0200, Gal Pressman wrote:
> The _get_unused_cpus() function can return CPU numbers >= 16, which
> exceeds RPS_MAX_CPUS in toeplitz.c. When this happens, the test fails
> with a cryptic message:
>
> # Exception| Traceback (most recent call last):
> # Exception| File
> "/tmp/cur/linux/tools/testing/selftests/net/lib/py/ksft.py", line 319, in
> ksft_run
> # Exception| func(*args)
> # Exception| File
> "/tmp/cur/linux/tools/testing/selftests/drivers/net/hw/toeplitz.py", line
> 189, in test
> # Exception| with bkg(" ".join(rx_cmd), ksft_ready=True,
> exit_wait=True) as rx_proc:
> # Exception| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> # Exception| File
> "/tmp/cur/linux/tools/testing/selftests/net/lib/py/utils.py", line 124, in
> __init__
> # Exception| super().__init__(comm, background=True,
> # Exception| File
> "/tmp/cur/linux/tools/testing/selftests/net/lib/py/utils.py", line 77, in
> __init__
> # Exception| raise Exception("Did not receive ready message")
> # Exception| Exception: Did not receive ready message
>
> Rename _get_unused_cpus() to _get_unused_rps_cpus() and cap the CPU
> search range to RPS_MAX_CPUS.
>
> Fixes: 9cf9aa77a1f6 ("selftests: drv-net: hw: convert the Toeplitz test to
> Python")
> Reviewed-by: Nimrod Oren <[email protected]>
> Signed-off-by: Gal Pressman <[email protected]>
Reviewed-by: Simon Horman <[email protected]>