From: Andrii Nakryiko Date: Mon, 15 Jun 2020 22:53:55 +0000 (-0700) Subject: tools/bpftool: Add ringbuf map to a list of known map types X-Git-Tag: v5.15~3509^2~77^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c34a06c56df7c513cd19f591b26fe7d814c778cc;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200615225355.366256-1-andriin@fb.com --- diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index c5fac80..99109a6a 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);