diff options
author | Andrey Ignatov <rdna@fb.com> | 2019-02-15 02:01:43 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-02-15 17:20:54 +0300 |
commit | 789f6bab849e04ea029c09b81dc8401dc0268cf9 (patch) | |
tree | 376d9ca0066237549b9fca7c81001bbf517f9967 /tools/lib/bpf/libbpf.map | |
parent | 1a11a4c74f73adb840d61371c3bb560ed4d7a87f (diff) | |
download | linux-789f6bab849e04ea029c09b81dc8401dc0268cf9.tar.xz |
libbpf: Introduce bpf_object__btf
Add new accessor for bpf_object to get opaque struct btf * from it.
struct btf * is needed for all operations with BTF and it's present in
bpf_object. The only thing missing is a way to get it.
Example use-case is to get BTF key_type_id and value_type_id for a map in
bpf_object. It can be done with btf__get_map_kv_tids() but that function
requires struct btf *.
Similar API can be added for struct btf_ext but no use-case for it yet.
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r-- | tools/lib/bpf/libbpf.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index 16f342c3d4bc..99dfa710c818 100644 --- a/tools/lib/bpf/libbpf.map +++ b/tools/lib/bpf/libbpf.map @@ -132,6 +132,7 @@ LIBBPF_0.0.2 { bpf_probe_prog_type; bpf_map__resize; bpf_map_lookup_elem_flags; + bpf_object__btf; bpf_object__find_map_fd_by_name; bpf_get_link_xdp_id; btf__dedup; |