summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/Documentation/bpftool-map.rst
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-01-16 22:10:03 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-01-17 12:30:31 +0300
commit549d4d3da7c4a75c25ea2726223ab96a1eeb135f (patch)
tree0e9311833bba261a792a79059e21fd7c63ede121 /tools/bpf/bpftool/Documentation/bpftool-map.rst
parent66cf6e0b1248e576468956cb33ad2dabc45163dc (diff)
downloadlinux-549d4d3da7c4a75c25ea2726223ab96a1eeb135f.tar.xz
bpftool: add push and enqueue commands
This is intended to be used with queues and stacks and be more user-friendly than 'update' without the key. Example: bpftool map create /sys/fs/bpf/q type queue value 4 entries 10 name q bpftool map push pinned /sys/fs/bpf/q value 0 1 2 3 bpftool map peek pinned /sys/fs/bpf/q value: 00 01 02 03 bpftool map create /sys/fs/bpf/s type stack value 4 entries 10 name s bpftool map enqueue pinned /sys/fs/bpf/s value 0 1 2 3 bpftool map peek pinned /sys/fs/bpf/s value: 00 01 02 03 Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/Documentation/bpftool-map.rst')
-rw-r--r--tools/bpf/bpftool/Documentation/bpftool-map.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/Documentation/bpftool-map.rst b/tools/bpf/bpftool/Documentation/bpftool-map.rst
index b79da683da88..435a79d2eed5 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-map.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-map.rst
@@ -32,6 +32,8 @@ MAP COMMANDS
| **bpftool** **map pin** *MAP* *FILE*
| **bpftool** **map event_pipe** *MAP* [**cpu** *N* **index** *M*]
| **bpftool** **map peek** *MAP*
+| **bpftool** **map push** *MAP* **value** *VALUE*
+| **bpftool** **map enqueue** *MAP* **value** *VALUE*
| **bpftool** **map help**
|
| *MAP* := { **id** *MAP_ID* | **pinned** *FILE* }
@@ -111,6 +113,12 @@ DESCRIPTION
**bpftool map peek** *MAP*
Peek next **value** in the queue or stack.
+ **bpftool map push** *MAP* **value** *VALUE*
+ Push **value** onto the stack.
+
+ **bpftool map enqueue** *MAP* **value** *VALUE*
+ Enqueue **value** into the queue.
+
**bpftool map help**
Print short help message.