aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/bash-completion
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2021-11-10 11:23:24 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2021-11-12 16:54:58 +0100
commit314f14abdeca78de6b16f97d796a9966ce4b90ae (patch)
treea61a2911f2cfb010d2b55b0dd4edcc392d3de6a0 /tools/bpf/bpftool/bash-completion
parentMerge branch 'Support BTF_KIND_TYPE_TAG for btf_type_tag attributes' (diff)
downloadlinux-dev-314f14abdeca78de6b16f97d796a9966ce4b90ae.tar.xz
linux-dev-314f14abdeca78de6b16f97d796a9966ce4b90ae.zip
bpftool: Enable libbpf's strict mode by default
Otherwise, attaching with bpftool doesn't work with strict section names. Also: - Add --legacy option to switch back to pre-1.0 behavior - Print a warning when program fails to load in strict mode to point to --legacy flag - By default, don't append / to the section name; in strict mode it's relevant only for a small subset of prog types + bpftool --legacy prog loadall tools/testing/selftests/bpf/test_cgroup_link.o /sys/fs/bpf/kprobe type kprobe libbpf: failed to pin program: File exists Error: failed to pin all programs + bpftool prog loadall tools/testing/selftests/bpf/test_cgroup_link.o /sys/fs/bpf/kprobe type kprobe v1 -> v2: - strict by default (Quentin Monnet) - add more info to --legacy description (Quentin Monnet) - add bash completion (Quentin Monnet) Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Link: https://lore.kernel.org/bpf/20211110192324.920934-1-sdf@google.com
Diffstat (limited to 'tools/bpf/bpftool/bash-completion')
-rw-r--r--tools/bpf/bpftool/bash-completion/bpftool2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool
index 88e2bcf16cca..4a1b02ff72c1 100644
--- a/tools/bpf/bpftool/bash-completion/bpftool
+++ b/tools/bpf/bpftool/bash-completion/bpftool
@@ -261,7 +261,7 @@ _bpftool()
# Deal with options
if [[ ${words[cword]} == -* ]]; then
local c='--version --json --pretty --bpffs --mapcompat --debug \
- --use-loader --base-btf'
+ --use-loader --base-btf --legacy'
COMPREPLY=( $( compgen -W "$c" -- "$cur" ) )
return 0
fi