Skip to content

Commit

Permalink
tools/bpftool: Add ringbuf map to a list of known map types
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Andrii Nakryiko authored and Daniel Borkmann committed Jun 16, 2020
1 parent b0659d8 commit c34a06c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/bpf/bpftool/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c34a06c

Please sign in to comment.