summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPuranjay Mohan <puranjay@kernel.org>2026-05-20 16:33:30 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-05-20 19:25:46 +0300
commitfa747e9f843ba3a0fa4d3fabaf50c9e11aaf963f (patch)
tree4601237e859931048e5d1de41e4d6219abaeab7e /include/linux
parent523d2f42b406f5be2989f436b03eacebf3679835 (diff)
downloadlinux-fa747e9f843ba3a0fa4d3fabaf50c9e11aaf963f.tar.xz
selftests/bpf: Fix cold_lru producing zero batch_hash in XDP LB benchmark
batch_hash = (batch_gen ^ cpu_id) * KNUTH_HASH_MULT; When batch_gen == cpu_id the XOR produces zero, batch_hash is zero, and *saddr ^= 0 is a no-op. Every iteration hits the warm LRU entry. During validation batch_gen is 2, so running on CPU 2 triggers: [udp-v4-lru-miss] COUNTER FAIL: LRU misses=0, expected 1 Replace XOR with addition so the multiplier input is always >= 1. This also preserves the per-CPU salt for multi-producer runs. Fixes: 4b4f2229104c ("selftests/bpf: Add XDP load-balancer BPF program") Signed-off-by: Puranjay Mohan <puranjay@kernel.org> Link: https://lore.kernel.org/r/20260520133338.3392667-2-puranjay@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions