summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/map.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-06-16 01:53:55 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-06-16 03:18:30 +0300
commitc34a06c56df7c513cd19f591b26fe7d814c778cc (patch)
tree0919bfb20f7dcd361e1ed79171adabd845da8733 /tools/bpf/bpftool/map.c
parentb0659d8a950d424e57cc0a67afc4740ee561224e (diff)
downloadlinux-c34a06c56df7c513cd19f591b26fe7d814c778cc.tar.xz
tools/bpftool: Add ringbuf map to a list of known map types
Add symbolic name "ringbuf" to map to BPF_MAP_TYPE_RINGBUF. Without this, users will see "type 27" instead of "ringbuf" in `map show` output. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20200615225355.366256-1-andriin@fb.com
Diffstat (limited to 'tools/bpf/bpftool/map.c')
-rw-r--r--tools/bpf/bpftool/map.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index c5fac8068ba1..99109a6afe17 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
@@ -49,6 +49,7 @@ const char * const map_type_name[] = {
[BPF_MAP_TYPE_STACK] = "stack",
[BPF_MAP_TYPE_SK_STORAGE] = "sk_storage",
[BPF_MAP_TYPE_STRUCT_OPS] = "struct_ops",
+ [BPF_MAP_TYPE_RINGBUF] = "ringbuf",
};
const size_t map_type_name_size = ARRAY_SIZE(map_type_name);