diff options
author | Stanislav Fomichev <sdf@google.com> | 2018-11-09 08:21:44 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-11-10 15:56:11 -0800 |
commit | 77380998d91dee8aafdbe42634776ba1ef692f1e (patch) | |
tree | 9fa3bca83bbc5eeba47a8e00e647f5be999eb698 /tools/bpf/bpftool/bash-completion | |
parent | 33a2c75c55e24aa30ff9fed805ae8bea13c1e2a3 (diff) | |
download | linux-77380998d91dee8aafdbe42634776ba1ef692f1e.tar.bz2 |
bpftool: add loadall command
This patch adds new *loadall* command which slightly differs from the
existing *load*. *load* command loads all programs from the obj file,
but pins only the first programs. *loadall* pins all programs from the
obj file under specified directory.
The intended usecase is flow_dissector, where we want to load a bunch
of progs, pin them all and after that construct a jump table.
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/bash-completion')
-rw-r--r-- | tools/bpf/bpftool/bash-completion/bpftool | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool index 3f78e6404589..780ebafb756a 100644 --- a/tools/bpf/bpftool/bash-completion/bpftool +++ b/tools/bpf/bpftool/bash-completion/bpftool @@ -243,7 +243,7 @@ _bpftool() # Completion depends on object and command in use case $object in prog) - if [[ $command != "load" ]]; then + if [[ $command != "load" && $command != "loadall" ]]; then case $prev in id) _bpftool_get_prog_ids @@ -309,7 +309,7 @@ _bpftool() fi return 0 ;; - load) + load|loadall) local obj if [[ ${#words[@]} -lt 6 ]]; then |