On Tue, Jan 14, 2020 at 2:44 PM Martin KaFai Lau <kafai@xxxxxx> wrote: > > This patch exposes bpf_find_kernel_btf() to libbpf_internal.h. > It will be used in 'bpftool map dump' in a following patch > to dump a map with btf_vmlinux_value_type_id set. > > Signed-off-by: Martin KaFai Lau <kafai@xxxxxx> > --- This function comes up not a first time, I guess it makes sense to finally make it a public API. We should also try to minimize number of internal APIs used by bpftool. So if no one objects to expose it, should we call it a bit more precisely and according to libbpf naming guidelines: libbpf_load_kernel_btf? libbpf_find_kernel_btf is acceptable, but it does more than just finding, thus "load". It should also probably live in btf.c+btf.h? WDYT? > tools/lib/bpf/libbpf.c | 3 +-- > tools/lib/bpf/libbpf_internal.h | 1 + > 2 files changed, 2 insertions(+), 2 deletions(-) > [...]