bpf: enable cgroup local storage map pretty print with kind_flag
authorYonghong Song <yhs@fb.com>
Sun, 16 Dec 2018 06:13:52 +0000 (22:13 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 18 Dec 2018 00:11:59 +0000 (01:11 +0100)
commitffa0c1cf59596fba54546ea828305acfcc2cf55e
treeb30071761afe90e0fbc7779429d3381cb1501b53
parent9d5f9f701b1891466fb3dbb1806ad97716f95cc3
bpf: enable cgroup local storage map pretty print with kind_flag

Commit 970289fc0a83 ("bpf: add bpffs pretty print for cgroup
local storage maps") added bpffs pretty print for cgroup
local storage maps. The commit worked for struct without kind_flag
set.

This patch refactored and made pretty print also work
with kind_flag set for the struct.

Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/btf.h
kernel/bpf/btf.c
kernel/bpf/local_storage.c