Skip to content
Commit b2f9f153 authored by Jakub Bogusz's avatar Jakub Bogusz Committed by Alexei Starovoitov
Browse files

libbpf: Fix libbpf hashmap on (I)LP32 architectures



On ILP32, 64-bit result was shifted by value calculated for 32-bit long type
and returned value was much outside hashmap capacity.
As advised by Andrii Nakryiko, this patch uses different hashing variant for
architectures with size_t shorter than long long.

Fixes: e3b92422 ("libbpf: add resizable non-thread safe internal hashmap")
Signed-off-by: default avatarJakub Bogusz <qboosh@pld-linux.org>
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200709225723.1069937-1-andriin@fb.com
parent f43cb0d6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment