> On Jun 5, 2019, at 4:15 PM, Hechao Li <hechaol@xxxxxx> 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. > > Hechao Li (2): > bpf: add a new API libbpf_num_possible_cpus() > bpf: use libbpf_num_possible_cpus in bpftool and selftests > > tools/bpf/bpftool/common.c | 53 +++----------------------- > tools/lib/bpf/libbpf.c | 49 ++++++++++++++++++++++++ > tools/lib/bpf/libbpf.h | 16 ++++++++ > tools/lib/bpf/libbpf.map | 1 + > tools/testing/selftests/bpf/bpf_util.h | 37 +++--------------- > 5 files changed, 76 insertions(+), 80 deletions(-) > > -- > 2.17.1 > Please specify which tree the patch is based on (bpf-next for this one), and version of patch (v2) in the subject with git format-patch --subject-prefix="PATCH v2 bpf-next" Thanks, Song