]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: drv-net: rss_ctx: Don't assume indirection table is present
authorGal Pressman <gal@nvidia.com>
Tue, 18 Mar 2025 11:24:26 +0000 (13:24 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 24 Mar 2025 19:22:37 +0000 (12:22 -0700)
The test_rss_context_dump() test assumes the indirection table is always
supported, which is not true for all drivers, e.g., virtio_net when
VIRTIO_NET_F_RSS is disabled.

Skip the check if 'indir' is not present.

Reviewed-by: Nimrod Oren <noren@nvidia.com>
Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250318112426.386651-1-gal@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/hw/rss_ctx.py

index d6e69d7d5e438d21a1741580dec90fe02a07c86b..ca60ae325c22eb1d35a669f9fa33d384bfa70012 100755 (executable)
@@ -392,7 +392,7 @@ def test_rss_context_dump(cfg):
 
     # Sanity-check the results
     for data in ctxs:
-        ksft_ne(set(data['indir']), {0}, "indir table is all zero")
+        ksft_ne(set(data.get('indir', [1])), {0}, "indir table is all zero")
         ksft_ne(set(data.get('hkey', [1])), {0}, "key is all zero")
 
         # More specific checks