All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/2] tools/btf: extends libbpf APIs to work with btf w/o kernel
@ 2019-02-06  0:29 Andrii Nakryiko
  2019-02-06  0:29 ` [PATCH v2 bpf-next 1/2] btf: separate btf creation and loading Andrii Nakryiko
  2019-02-06  0:29 ` [PATCH v2 bpf-next 2/2] btf: expose API to work with raw btf data Andrii Nakryiko
  0 siblings, 2 replies; 10+ messages in thread
From: Andrii Nakryiko @ 2019-02-06  0:29 UTC (permalink / raw)
  To: songliubraving, yhs, ast, kafai, netdev, daniel, andrii.nakryiko
  Cc: Andrii Nakryiko

This patchset changes existing btf__new() API call to only load and initialize
struct btf, while exposing new btf__load() API to attempt to load and validate
BTF in kernel. It also adds ability to copy raw BTF data out of struct btf for
further processing by external applications.

This makes utilizing libbpf's APIs that don't require kernel facilities (e.g.,
btf_dedup) simpler and more natural from external application.

v1->v2:
- btf_load() returns just error, not fd
- fix ordering in libbpf.map

Andrii Nakryiko (2):
  btf: separate btf creation and loading
  btf: expose API to work with raw btf data

 tools/lib/bpf/btf.c      | 63 +++++++++++++++++++++++++---------------
 tools/lib/bpf/btf.h      |  3 ++
 tools/lib/bpf/libbpf.c   |  2 +-
 tools/lib/bpf/libbpf.map |  3 ++
 4 files changed, 46 insertions(+), 25 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2019-02-07 20:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06  0:29 [PATCH v2 bpf-next 0/2] tools/btf: extends libbpf APIs to work with btf w/o kernel Andrii Nakryiko
2019-02-06  0:29 ` [PATCH v2 bpf-next 1/2] btf: separate btf creation and loading Andrii Nakryiko
2019-02-06  3:03   ` Alexei Starovoitov
2019-02-06  5:03     ` Andrii Nakryiko
2019-02-06  0:29 ` [PATCH v2 bpf-next 2/2] btf: expose API to work with raw btf data Andrii Nakryiko
2019-02-06  3:07   ` Alexei Starovoitov
2019-02-06  5:46     ` Andrii Nakryiko
2019-02-06  6:24       ` Alexei Starovoitov
2019-02-07 19:21         ` Andrii Nakryiko
2019-02-07 20:13           ` Andrii Nakryiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.