BPF List
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/5] bpftool: Support dumping a map with btf_vmlinux_value_type_id
@ 2020-01-15 23:00 Martin KaFai Lau
  2020-01-15 23:00 ` [PATCH v3 bpf-next 1/5] bpftool: Fix a leak of btf object Martin KaFai Lau
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Martin KaFai Lau @ 2020-01-15 23:00 UTC (permalink / raw)
  To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, David Miller, kernel-team,
	netdev

When a map is storing a kernel's struct, its
map_info->btf_vmlinux_value_type_id is set.  The first map type
supporting it is BPF_MAP_TYPE_STRUCT_OPS.

This series adds support to dump this kind of map with BTF.
The first two patches are bug fixes which are only applicable to
bpf-next.

Please see individual patches for details.

v3:
- Remove unnecessary #include "libbpf_internal.h" from patch 5

v2:
- Expose bpf_find_kernel_btf() as a LIBBPF_API in patch 3 (Andrii)
- Cache btf_vmlinux in bpftool/map.c (Andrii)

Martin KaFai Lau (5):
  bpftool: Fix a leak of btf object
  bpftool: Fix missing BTF output for json during map dump
  libbpf: Expose bpf_find_kernel_btf as a LIBBPF_API
  bpftool: Add struct_ops map name
  bpftool: Support dumping a map with btf_vmlinux_value_type_id

 tools/bpf/bpftool/map.c  | 102 ++++++++++++++++++++++++---------------
 tools/lib/bpf/btf.c      | 102 ++++++++++++++++++++++++++++++++++++---
 tools/lib/bpf/btf.h      |   2 +
 tools/lib/bpf/libbpf.c   |  93 ++---------------------------------
 tools/lib/bpf/libbpf.map |   1 +
 5 files changed, 166 insertions(+), 134 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-01-15 23:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-15 23:00 [PATCH v3 bpf-next 0/5] bpftool: Support dumping a map with btf_vmlinux_value_type_id Martin KaFai Lau
2020-01-15 23:00 ` [PATCH v3 bpf-next 1/5] bpftool: Fix a leak of btf object Martin KaFai Lau
2020-01-15 23:00 ` [PATCH v3 bpf-next 2/5] bpftool: Fix missing BTF output for json during map dump Martin KaFai Lau
2020-01-15 23:00 ` [PATCH v3 bpf-next 3/5] libbpf: Expose bpf_find_kernel_btf as a LIBBPF_API Martin KaFai Lau
2020-01-15 23:00 ` [PATCH v3 bpf-next 4/5] bpftool: Add struct_ops map name Martin KaFai Lau
2020-01-15 23:00 ` [PATCH v3 bpf-next 5/5] bpftool: Support dumping a map with btf_vmlinux_value_type_id Martin KaFai Lau
2020-01-15 23:26 ` [PATCH v3 bpf-next 0/5] " Alexei Starovoitov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox