aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorMartin KaFai Lau <[email protected]>2024-01-12 19:05:28 +0000
committerAlexei Starovoitov <[email protected]>2024-01-13 19:01:44 +0000
commit19ca0823f6eaad01d18f664a00550abe912c034c (patch)
treef3b56edf62d964d24064b1ffb659697cb71f2408 /tools/testing
parentnet: netdev_queue: netdev_txq_completed_mb(): fix wake condition (diff)
downloadkernel-19ca0823f6eaad01d18f664a00550abe912c034c.tar.gz
kernel-19ca0823f6eaad01d18f664a00550abe912c034c.zip
bpf: iter_udp: Retry with a larger batch size without going back to the previous bucket
The current logic is to use a default size 16 to batch the whole bucket. If it is too small, it will retry with a larger batch size. The current code accidentally does a state->bucket-- before retrying. This goes back to retry with the previous bucket which has already been done. This patch fixed it. It is hard to create a selftest. I added a WARN_ON(state->bucket < 0), forced a particular port to be hashed to the first bucket, created >16 sockets, and observed the for-loop went back to the "-1" bucket. Cc: Aditi Ghag <[email protected]> Fixes: c96dac8d369f ("bpf: udp: Implement batching for sockets iterator") Acked-by: Yonghong Song <[email protected]> Signed-off-by: Martin KaFai Lau <[email protected]> Reviewed-by: Aditi Ghag <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions