Skip to content

Commit 84c72ce

Browse files
iamkafaiAlexei Starovoitov
authored andcommitted
bpftool: Add struct_ops map name
This patch adds BPF_MAP_TYPE_STRUCT_OPS to "struct_ops" name mapping so that "bpftool map show" can print the "struct_ops" map type properly. [root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool map show id 8 8: struct_ops name dctcp flags 0x0 key 4B value 256B max_entries 1 memlock 4096B btf_id 7 Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200115230037.1102674-1-kafai@fb.com
1 parent fb2426a commit 84c72ce

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tools/bpf/bpftool/map.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const char * const map_type_name[] = {
4848
[BPF_MAP_TYPE_QUEUE] = "queue",
4949
[BPF_MAP_TYPE_STACK] = "stack",
5050
[BPF_MAP_TYPE_SK_STORAGE] = "sk_storage",
51+
[BPF_MAP_TYPE_STRUCT_OPS] = "struct_ops",
5152
};
5253

5354
const size_t map_type_name_size = ARRAY_SIZE(map_type_name);

0 commit comments

Comments
 (0)