Skip to contentSkip to conversation

tools/bpftool: add ringbuf map to a list of known map types

PATCH Applied Andrii Nakryiko 2 participants 2 messages Jun 15, 2020 – Jun 16, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tools/bpf/bpftool/map.c | 1 +
 1 file changed, 1 insertion(+)
tools/bpf/bpftool/map.c +1 -0
index c5fac8068ba1..99109a6afe17 100644
@@ -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);
Signature · 1 line
2.24.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Andrii Nakryiko

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.

Applied, thanks!