Re: [PATCH v2 bpf] bpf: selftests: handle sparse CPU allocations

2019-01-31 Thread Daniel Borkmann
On 01/31/2019 10:19 AM, Martynas Pumputis wrote: > Previously, bpf_num_possible_cpus() had a bug when calculating a > number of possible CPUs in the case of sparse CPU allocations, as > it was considering only the first range or element of > /sys/devices/system/cpu/possible. > > E.g. in the case o

Re: [PATCH v2 bpf] bpf: selftests: handle sparse CPU allocations

2019-01-31 Thread Y Song
On Thu, Jan 31, 2019 at 1:18 AM Martynas Pumputis wrote: > > Previously, bpf_num_possible_cpus() had a bug when calculating a > number of possible CPUs in the case of sparse CPU allocations, as > it was considering only the first range or element of > /sys/devices/system/cpu/possible. > > E.g. in

[PATCH v2 bpf] bpf: selftests: handle sparse CPU allocations

2019-01-31 Thread Martynas Pumputis
Previously, bpf_num_possible_cpus() had a bug when calculating a number of possible CPUs in the case of sparse CPU allocations, as it was considering only the first range or element of /sys/devices/system/cpu/possible. E.g. in the case of "0,2-3" (CPU 1 is not available), the function returned 1 i