linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 perf/core 0/7] Libbpf improvements
@ 2017-01-23  1:11 Joe Stringer
  2017-01-23  1:11 ` [PATCHv2 perf/core 1/7] tools lib bpf: Fix map offsets in relocation Joe Stringer
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Joe Stringer @ 2017-01-23  1:11 UTC (permalink / raw)
  To: acme; +Cc: wangnan0, ast, daniel, linux-kernel, netdev

Patch 1 fixes an issue when using drastically different BPF map definitions
inside ELFs from a client using libbpf, vs the map definition libbpf uses.

Patches 2-4 add some simple, useful helper functions for setting prog type
and retrieving libbpf errors without depending on kernel headers from
userspace programs.

Patches 5-7 add a new pinning functionality for maps, programs, and objects.
Library users may call bpf_map__pin(map, path) or bpf_program__pin(prog, path)
to pin maps and programs separately, or use bpf_object__pin(obj, path) to
pin all maps and programs from the BPF object to the path. The map and program
variations require a full path where it will be pinned in the filesystem,
and the object variation will create directories "maps/" and "progs/" under
the specified path, then mount each map and program under those subdirectories.

---
v1: Initial post.
v2: Wang Nan provided improvements to patch 1.
    Dropped patch 2 from v1.
    Added acks for acked patches.
    Split the bpf_obj__pin() to also provide map / program pinning APIs.
    Allow users to provide full filesystem path (don't autodetect/mount BPFFS).

Joe Stringer (7):
  tools lib bpf: Fix map offsets in relocation
  tools lib bpf: Define prog_type fns with macro
  tools lib bpf: Add set/is helpers for all prog types
  tools lib bpf: Add libbpf_get_error()
  tools lib bpf: Add bpf_program__pin()
  tools lib bpf: Add bpf_map__pin()
  tools lib bpf: Add bpf_object__pin()

 tools/lib/bpf/libbpf.c  | 240 ++++++++++++++++++++++++++++++++++++++++++------
 tools/lib/bpf/libbpf.h  |  17 +++-
 tools/perf/tests/llvm.c |   2 +-
 3 files changed, 229 insertions(+), 30 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2017-01-26 19:48 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23  1:11 [PATCHv2 perf/core 0/7] Libbpf improvements Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 1/7] tools lib bpf: Fix map offsets in relocation Joe Stringer
2017-01-26 15:29   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 2/7] tools lib bpf: Define prog_type fns with macro Joe Stringer
2017-01-26 15:30   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 3/7] tools lib bpf: Add set/is helpers for all prog types Joe Stringer
2017-01-26 15:30   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 4/7] tools lib bpf: Add libbpf_get_error() Joe Stringer
2017-01-26 15:31   ` [tip:perf/core] " tip-bot for Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 5/7] tools lib bpf: Add bpf_program__pin() Joe Stringer
2017-01-25  1:04   ` Wangnan (F)
2017-01-25  1:06     ` Wangnan (F)
2017-01-25  1:16       ` Joe Stringer
2017-01-25  2:18         ` Wangnan (F)
2017-01-26 19:32           ` Arnaldo Carvalho de Melo
2017-01-26 19:43             ` Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 6/7] tools lib bpf: Add bpf_map__pin() Joe Stringer
2017-01-23  1:11 ` [PATCHv2 perf/core 7/7] tools lib bpf: Add bpf_object__pin() Joe Stringer
2017-01-24 16:12 ` [PATCHv2 perf/core 0/7] Libbpf improvements Arnaldo Carvalho de Melo
2017-01-25  0:50   ` Joe Stringer

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).