Re: [PATCH bpf] libbpf: Fix libbpf hashmap on (I)LP32 architectures

2020-07-09 Thread Andrii Nakryiko
On Thu, Jul 9, 2020 at 3:57 PM Andrii Nakryiko wrote: > > From: Jakub Bogusz > > 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 > ar

[PATCH bpf] libbpf: Fix libbpf hashmap on (I)LP32 architectures

2020-07-09 Thread Andrii Nakryiko
From: Jakub Bogusz 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: e3b924224028