Re: [PATCH] bpftool: use btf_vlen()/btf_kind()/btf_kflag() helpers consistently

From: Quentin Monnet

Date: Wed Jul 01 2026 - 09:20:55 EST


On 01/07/2026 07:25, luoliang@xxxxxxxxxx wrote:
> From: luoliang <luoliang@xxxxxxxxxx>
>
> The btf_vlen(), btf_kind() and btf_kflag() inline helpers defined in
> tools/lib/bpf/btf.h are thin wrappers around the BTF_INFO_VLEN(),
> BTF_INFO_KIND() and BTF_INFO_KFLAG() UAPI macros - each one simply
> returns the corresponding macro applied to t->info.
>
> bpftool already uses these helpers in most places, but 13 call sites
> in btf.c and btf_dumper.c still open-code the raw macros. Use the
> helpers consistently, matching the rest of bpftool as well as libbpf.
>
> No functional change.
>
> Signed-off-by: Liang Luo <luoliang@xxxxxxxxxx>


Reviewed-by: Quentin Monnet <qmo@xxxxxxxxxx>

Thank you