Skip to content

Commit 197c2da

Browse files
calaveraborkmann
authored andcommitted
bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_STACK to bpftool-map
I noticed that these two new BPF Maps are not defined in bpftool. This patch defines those two maps and adds their names to the bpftool-map documentation. Signed-off-by: David Calavera <david.calavera@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 5a86381 commit 197c2da

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tools/bpf/bpftool/Documentation/bpftool-map.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ MAP COMMANDS
4242
| | **percpu_array** | **stack_trace** | **cgroup_array** | **lru_hash**
4343
| | **lru_percpu_hash** | **lpm_trie** | **array_of_maps** | **hash_of_maps**
4444
| | **devmap** | **sockmap** | **cpumap** | **xskmap** | **sockhash**
45-
| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage** }
45+
| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage**
46+
| | **queue** | **stack** }
4647
4748
DESCRIPTION
4849
===========

tools/bpf/bpftool/map.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ static const char * const map_type_name[] = {
7474
[BPF_MAP_TYPE_CGROUP_STORAGE] = "cgroup_storage",
7575
[BPF_MAP_TYPE_REUSEPORT_SOCKARRAY] = "reuseport_sockarray",
7676
[BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE] = "percpu_cgroup_storage",
77+
[BPF_MAP_TYPE_QUEUE] = "queue",
78+
[BPF_MAP_TYPE_STACK] = "stack",
7779
};
7880

7981
static bool map_is_per_cpu(__u32 type)

0 commit comments

Comments
 (0)