bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_QUEUE to bpftool-map
Subsystems (4)
PATCH 1/1 bpf: Add BPF_MAP_TYPE_QUEUE and BPF_MAP_TYPE_QUEUE 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.
--- tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- tools/bpf/bpftool/map.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)
tools/bpf/bpftool/Documentation/bpftool-map.rst +2 -1
@@ -42,7 +42,8 @@ MAP COMMANDS | | **percpu_array** | **stack_trace** | **cgroup_array** | **lru_hash** | | **lru_percpu_hash** | **lpm_trie** | **array_of_maps** | **hash_of_maps** | | **devmap** | **sockmap** | **cpumap** | **xskmap** | **sockhash** -| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage** } +| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage** +| | **queue** | **stack** } DESCRIPTION ===========
tools/bpf/bpftool/map.c +2 -0
@@ -74,6 +74,8 @@ static const char * const map_type_name[] = { [BPF_MAP_TYPE_CGROUP_STORAGE] = "cgroup_storage", [BPF_MAP_TYPE_REUSEPORT_SOCKARRAY] = "reuseport_sockarray", [BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE] = "percpu_cgroup_storage", + [BPF_MAP_TYPE_QUEUE] = "queue", + [BPF_MAP_TYPE_STACK] = "stack", };static bool map_is_per_cpu (__u32 type)
Signature · 1 line
2.17.1
Quoted 6 lines · David Calavera
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 <[email protected]>---
Subject line says 'QUEUE' twice, should one of those be 'STACK'?
Quoted 31 lines
tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- tools/bpf/bpftool/map.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)tools/bpf/bpftool/Documentation/bpftool-map.rst +2
-1@@ -42,7 +42,8 @@ MAP COMMANDS | | **percpu_array** | **stack_trace** | **cgroup_array** | **lru_hash** | | **lru_percpu_hash** | **lpm_trie** | **array_of_maps** | **hash_of_maps** | | **devmap** | **sockmap** | **cpumap** | **xskmap** | **sockhash** -| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage** } +| | **cgroup_storage** | **reuseport_sockarray** | **percpu_cgroup_storage** +| | **queue** | **stack** } DESCRIPTION ===========tools/bpf/bpftool/map.c +2
-0@@ -74,6 +74,8 @@ static const char * const map_type_name[] = { [BPF_MAP_TYPE_CGROUP_STORAGE] = "cgroup_storage", [BPF_MAP_TYPE_REUSEPORT_SOCKARRAY] = "reuseport_sockarray", [BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE] = "percpu_cgroup_storage", + [BPF_MAP_TYPE_QUEUE] = "queue", + [BPF_MAP_TYPE_STACK] = "stack", };static bool map_is_per_cpu (__u32 type)
Daniel Borkmann
maintainerQuoted 8 lines · David Calavera
Hi,
Sorry for the mistake, I'll send a new patch. Before doing that, I've noticed that the array of map names in
tools/bpf/bpftool/map.cis very inconsistent in formatting, some lines use tabs to align the names, others use spaces, and other are not aligned at all. Is there any formatting convention for this? I can fix those lines if you have a preferred method now that I'm adding new elements to that array.
I've fixed the typo from the subject and applied your patch. If you want to send a patch with white-space cleanup for all the entries that would be fine with me, sure. You could align all the '=' with tabs to the one from percpu_cgroup_storage.
Thanks,
Daniel
Quoted 51 lines · Edward Cree
Quoted 49 lines · David Calavera
Quoted 6 lines
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 <[email protected]>---
Subject line says 'QUEUE' twice, should one of those be 'STACK'?
Review
Quoted 5 lines
tools/bpf/bpftool/Documentation/bpftool-map.rst | 3 ++- tools/bpf/bpftool/map.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/tools/bpf/bpftool/Documentation/bpftool-map.rsttools/bpf/bpftool/Documentation/bpftool-map.rst MAP COMMANDS · line 42
Quoted 5 lines
index
f55a2daed59b..9e827e342d9e100644tools/bpf/bpftool/Documentation/bpftool-map.rst +0
-0@@ -42,7 +42,8 @@ MAP COMMANDS | | **percpu_array** | **stack_trace** | **cgroup_array** |**lru_hash**
tools/bpf/bpftool/Documentation/bpftool-map.rst MAP COMMANDS · line 43
Quoted 1 line
tools/bpf/bpftool/Documentation/bpftool-map.rst +0
-0| | **lru_percpu_hash** | **lpm_trie** | **array_of_maps** |**hash_of_maps**
tools/bpf/bpftool/Documentation/bpftool-map.rst MAP COMMANDS · line 44
Quoted 1 line
tools/bpf/bpftool/Documentation/bpftool-map.rst +0
-0| | **devmap** | **sockmap** | **cpumap** | **xskmap** |**sockhash**
tools/bpf/bpftool/Documentation/bpftool-map.rst MAP COMMANDS · line 45
Quoted 1 line
tools/bpf/bpftool/Documentation/bpftool-map.rst +0
-1-| | **cgroup_storage** | **reuseport_sockarray** |**percpu_cgroup_storage** }
tools/bpf/bpftool/Documentation/bpftool-map.rst MAP COMMANDS · line 45
Quoted 1 line
tools/bpf/bpftool/Documentation/bpftool-map.rst +1
-0+| | **cgroup_storage** | **reuseport_sockarray** |**percpu_cgroup_storage**
Quoted 17 lines
tools/bpf/bpftool/Documentation/bpftool-map.rst +1
-0+| | **queue** | **stack** } DESCRIPTION ===========tools/bpf/bpftool/map.c +2
-0@@ -74,6 +74,8 @@ static const char * const map_type_name[] = { [BPF_MAP_TYPE_CGROUP_STORAGE] = "cgroup_storage", [BPF_MAP_TYPE_REUSEPORT_SOCKARRAY] = "reuseport_sockarray", [BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE] = "percpu_cgroup_storage", + [BPF_MAP_TYPE_QUEUE] = "queue", + [BPF_MAP_TYPE_STACK] = "stack", };static bool map_is_per_cpu (__u32 type)