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.

selftests: drv-net: rss_ctx: make the test pass with few queues

rss_ctx.test_rss_key_indir implicitly expects at least 5 queues,
as it checks that the traffic on first 2 queues is lower than
the remaining queues when we use all queues. Special case fewer
queues.

Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250901173139.881070-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+7 -2
+7 -2
tools/testing/selftests/drivers/net/hw/rss_ctx.py
··· 178 178 cnts = _get_rx_cnts(cfg) 179 179 GenerateTraffic(cfg).wait_pkts_and_stop(20000) 180 180 cnts = _get_rx_cnts(cfg, prev=cnts) 181 - # First two queues get less traffic than all the rest 182 - ksft_lt(sum(cnts[:2]), sum(cnts[2:]), "traffic distributed: " + str(cnts)) 181 + if qcnt > 4: 182 + # First two queues get less traffic than all the rest 183 + ksft_lt(sum(cnts[:2]), sum(cnts[2:]), 184 + "traffic distributed: " + str(cnts)) 185 + else: 186 + # When queue count is low make sure third queue got significant pkts 187 + ksft_ge(cnts[2], 3500, "traffic distributed: " + str(cnts)) 183 188 184 189 185 190 def test_rss_queue_reconfigure(cfg, main_ctx=True):