bpftool: recognize BPF_MAP_TYPE_CPUMAP maps
authorRoman Gushchin <guro@fb.com>
Fri, 19 Jan 2018 14:17:45 +0000 (14:17 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 19 Jan 2018 22:16:52 +0000 (23:16 +0100)
Add BPF_MAP_TYPE_CPUMAP map type to the list
of map type recognized by bpftool and define
corresponding text representation.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Quentin Monnet <quentin.monnet@netronome.com>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Acked-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/map.c

index a152c1a5c94c79dc03d85a1ce1b8d312276c1c66..f95fa67bb498f3f701e100d3be14ec32ac5fb658 100644 (file)
@@ -66,6 +66,7 @@ static const char * const map_type_name[] = {
        [BPF_MAP_TYPE_HASH_OF_MAPS]     = "hash_of_maps",
        [BPF_MAP_TYPE_DEVMAP]           = "devmap",
        [BPF_MAP_TYPE_SOCKMAP]          = "sockmap",
+       [BPF_MAP_TYPE_CPUMAP]           = "cpumap",
 };
 
 static unsigned int get_possible_cpus(void)