]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Support dumping a map with btf_vmlinux_value_type_id
authorMartin KaFai Lau <kafai@fb.com>
Wed, 15 Jan 2020 23:00:44 +0000 (15:00 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Jan 2020 23:23:27 +0000 (15:23 -0800)
commitb6d4aafcf5e26820ce2a349d1b165b845060a353
treedc987dca94677c0e814dc195fc76dba0ca1e446f
parenta13c32b4356a1149a362eaa3f2043d2b70331413
bpftool: Support dumping a map with btf_vmlinux_value_type_id

This patch makes bpftool support dumping a map's value properly
when the map's value type is a type of the running kernel's btf.
(i.e. map_info.btf_vmlinux_value_type_id is set instead of
map_info.btf_value_type_id).  The first usecase is for the
BPF_MAP_TYPE_STRUCT_OPS.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200115230044.1103008-1-kafai@fb.com
tools/bpf/bpftool/map.c