Re: [PATCH v6 bpf-next 0/3] Add a new API libbpf_num_possible_cpus()

2019-06-11 Thread Daniel Borkmann
On 06/11/2019 02:56 AM, Hechao Li wrote: > Getting number of possible CPUs is commonly used for per-CPU BPF maps > and perf_event_maps. Add a new API libbpf_num_possible_cpus() that > helps user with per-CPU related operations and remove duplicate > implementations in bpftool and selftests. > > v2

[PATCH v6 bpf-next 0/3] Add a new API libbpf_num_possible_cpus()

2019-06-10 Thread Hechao Li
Getting number of possible CPUs is commonly used for per-CPU BPF maps and perf_event_maps. Add a new API libbpf_num_possible_cpus() that helps user with per-CPU related operations and remove duplicate implementations in bpftool and selftests. v2: Save errno before calling pr_warning in case it is