[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190206002949.1915237-1-andriin@fb.com>
Date: Tue, 5 Feb 2019 16:29:47 -0800
From: Andrii Nakryiko <andriin@...com>
To: <songliubraving@...com>, <yhs@...com>, <ast@...com>,
<kafai@...com>, <netdev@...r.kernel.org>, <daniel@...earbox.next>,
<andrii.nakryiko@...il.com>
CC: Andrii Nakryiko <andriin@...com>
Subject: [PATCH v2 bpf-next 0/2] tools/btf: extends libbpf APIs to work with btf w/o kernel
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
Powered by blists - more mailing lists