netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/2] bpf: Add a new API libbpf_num_possible_cpus()
@ 2019-06-06 19:39 Hechao Li
  2019-06-06 19:39 ` [PATCH v3 bpf-next 1/2] bpf: add " Hechao Li
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Hechao Li @ 2019-06-06 19:39 UTC (permalink / raw)
  To: bpf; +Cc: netdev, daniel, kernel-team, 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.

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                 | 57 ++++++++++++++++++++++++++
 tools/lib/bpf/libbpf.h                 | 16 ++++++++
 tools/lib/bpf/libbpf.map               |  1 +
 tools/testing/selftests/bpf/bpf_util.h | 37 +++--------------
 5 files changed, 84 insertions(+), 80 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-06 22:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-06 19:39 [PATCH v3 bpf-next 0/2] bpf: Add a new API libbpf_num_possible_cpus() Hechao Li
2019-06-06 19:39 ` [PATCH v3 bpf-next 1/2] bpf: add " Hechao Li
2019-06-06 22:10   ` Andrii Nakryiko
2019-06-06 19:39 ` [PATCH v3 bpf-next 2/2] bpf: use libbpf_num_possible_cpus in bpftool and selftests Hechao Li
2019-06-06 20:26 ` [PATCH v3 bpf-next 0/2] bpf: Add a new API libbpf_num_possible_cpus() Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).