diff options
author | Paul Chaignon <paul.chaignon@orange.com> | 2019-12-13 20:10:17 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-12-15 09:03:18 -0800 |
commit | a7d22ca2a483d6c69c0791954447464297315ffa (patch) | |
tree | 6d8abf29900bda20bfda5946945ec18156573ea1 /tools/bpf/bpftool/Documentation/bpftool-map.rst | |
parent | bpftool: Match several programs with same tag (diff) | |
download | linux-dev-a7d22ca2a483d6c69c0791954447464297315ffa.tar.xz linux-dev-a7d22ca2a483d6c69c0791954447464297315ffa.zip |
bpftool: Match programs by name
When working with frequently modified BPF programs, both the ID and the
tag may change. bpftool currently doesn't provide a "stable" way to match
such programs.
This patch implements lookup by name for programs. The show and dump
commands will return all programs with the given name, whereas other
commands will error out if several programs have the same name.
Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Link: https://lore.kernel.org/bpf/b5fc1a5dcfaeb5f16fc80295cdaa606dd2d91534.1576263640.git.paul.chaignon@gmail.com
Diffstat (limited to 'tools/bpf/bpftool/Documentation/bpftool-map.rst')
-rw-r--r-- | tools/bpf/bpftool/Documentation/bpftool-map.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/Documentation/bpftool-map.rst b/tools/bpf/bpftool/Documentation/bpftool-map.rst index 1c0f7146aab0..90d848b5b7d3 100644 --- a/tools/bpf/bpftool/Documentation/bpftool-map.rst +++ b/tools/bpf/bpftool/Documentation/bpftool-map.rst @@ -41,7 +41,7 @@ MAP COMMANDS | | *MAP* := { **id** *MAP_ID* | **pinned** *FILE* } | *DATA* := { [**hex**] *BYTES* } -| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* } +| *PROG* := { **id** *PROG_ID* | **pinned** *FILE* | **tag** *PROG_TAG* | **name** *PROG_NAME* } | *VALUE* := { *DATA* | *MAP* | *PROG* } | *UPDATE_FLAGS* := { **any** | **exist** | **noexist** } | *TYPE* := { **hash** | **array** | **prog_array** | **perf_event_array** | **percpu_hash** |