Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'selftests-couple-of-fixes-in-toeplitz-rps-cases'

Gal Pressman says:

====================
selftests: Couple of fixes in Toeplitz RPS cases

Fix a couple of bugs in the RPS cases of the Toeplitz selftest.
====================

Link: https://patch.msgid.link/20260112173715.384843-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+6 -4
+2 -2
tools/testing/selftests/drivers/net/hw/toeplitz.c
··· 485 485 486 486 bitmap = strtoul(arg, NULL, 0); 487 487 488 - if (bitmap & ~(RPS_MAX_CPUS - 1)) 489 - error(1, 0, "rps bitmap 0x%lx out of bounds 0..%lu", 488 + if (bitmap & ~((1UL << RPS_MAX_CPUS) - 1)) 489 + error(1, 0, "rps bitmap 0x%lx out of bounds, max cpu %lu", 490 490 bitmap, RPS_MAX_CPUS - 1); 491 491 492 492 for (i = 0; i < RPS_MAX_CPUS; i++)
+4 -2
tools/testing/selftests/drivers/net/hw/toeplitz.py
··· 94 94 mask = 0 95 95 for cpu in rps_cpus: 96 96 mask |= (1 << cpu) 97 - mask = hex(mask)[2:] 97 + 98 + mask = hex(mask) 98 99 99 100 # Set RPS bitmap for all rx queues 100 101 for rps_file in glob.glob(f"/sys/class/net/{cfg.ifname}/queues/rx-*/rps_cpus"): 101 102 with open(rps_file, "w", encoding="utf-8") as fp: 102 - fp.write(mask) 103 + # sysfs expects hex without '0x' prefix, toeplitz.c needs the prefix 104 + fp.write(mask[2:]) 103 105 104 106 return mask 105 107