]> git.baikalelectronics.ru Git - kernel.git/commit
bpftool: add push and enqueue commands
authorStanislav Fomichev <sdf@google.com>
Wed, 16 Jan 2019 19:10:03 +0000 (11:10 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Jan 2019 09:30:31 +0000 (10:30 +0100)
commit1aa47346e67c5b4ba16426b52486f48cf8e6615a
tree0e9311833bba261a792a79059e21fd7c63ede121
parent9f9a05e327d34287810d5422e2303b9dd31a3d24
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>
tools/bpf/bpftool/Documentation/bpftool-map.rst
tools/bpf/bpftool/map.c