Skip to content

bpftool: improve split BTF support

Andrii Nakryiko bpf netdev 1 version Applied

Status from this message: Applied, Thanks

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3tools/bpftool: emit name <anon> for anonymous BTFstools/bpf/bpftool/btf.c+2 -00 replies
2/3libbpf: add base BTF accessortools/lib/bpf/btf.c tools/lib/bpf/btf.h tools/lib/bpf/libbpf.map+7 -00 replies
3/3tools/bpftool: auto-detect split BTFs in common casestools/bpf/bpftool/btf.c+21 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] bpftool: improve split BTF support

Few follow up improvements to bpftool for split BTF support:
- emit "name <anon>" for non-named BTFs in bpftool btf show command;
- when dumping /sys/kernel/btf/<module> use /sys/kernel/btf/vmlinux as the base BTF, unless base BTF is explicitly specified with -B flag.

This patch set also adds btf__base_btf() getter to access base BTF of the struct btf.

Andrii Nakryiko (3):
tools/bpftool: emit name <anon> for anonymous BTFs
libbpf: add base BTF accessor
tools/bpftool: auto-detect split BTFs in common cases

 tools/bpf/bpftool/btf.c  | 27 +++++++++++++++++++++++----
 tools/lib/bpf/btf.c      |  5 +++++
 tools/lib/bpf/btf.h      |  1 +
 tools/lib/bpf/libbpf.map |  1 +
 4 files changed, 30 insertions(+), 4 deletions(-)
Signature · 1 line
2.24.1