]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: Add struct_ops map name
authorMartin KaFai Lau <kafai@fb.com>
Wed, 15 Jan 2020 23:00:37 +0000 (15:00 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 15 Jan 2020 23:23:27 +0000 (15:23 -0800)
commite04714d3fa4ec9e599277898ecd05198e11a0f7a
tree97fa58b29b323a1e179a48d44bd7580d8cb0a9fb
parentfecf405b281478286195aea4bb903e8f7da6ad5d
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
tools/bpf/bpftool/map.c