diff options
author | Quentin Monnet <quentin.monnet@netronome.com> | 2018-11-30 17:25:47 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-11-30 23:06:06 +0100 |
commit | 73f0b9db53836a68c40691fad1467ed44a3123e8 (patch) | |
tree | 9d98468a3a709cd95217ec5e9f29fae12a511850 /tools | |
parent | tools: bpftool: fix bash completion for new map types (queue and stack) (diff) | |
download | linux-73f0b9db53836a68c40691fad1467ed44a3123e8.tar.xz linux-73f0b9db53836a68c40691fad1467ed44a3123e8.zip |
tools: bpftool: mark offloaded programs more explicitly in plain output
In bpftool (plain) output for "bpftool prog show" or "bpftool map show",
an offloaded BPF object is simply denoted with "dev ifname", which is
not really explicit. Change it with something that clearly shows the
program is offloaded.
While at it also add an additional space, as done between other
information fields.
Example output, before:
# bpftool prog show
1337: xdp tag a04f5eef06a7f555 dev foo
loaded_at 2018-10-19T16:40:36+0100 uid 0
xlated 16B not jited memlock 4096B
After:
# bpftool prog show
1337: xdp tag a04f5eef06a7f555 offloaded_to foo
loaded_at 2018-10-19T16:40:36+0100 uid 0
xlated 16B not jited memlock 4096B
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bpf/bpftool/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c index 4349b6683ca8..172d3761d9ab 100644 --- a/tools/bpf/bpftool/common.c +++ b/tools/bpf/bpftool/common.c @@ -604,7 +604,7 @@ void print_dev_plain(__u32 ifindex, __u64 ns_dev, __u64 ns_inode) if (!ifindex) return; - printf(" dev "); + printf(" offloaded_to "); if (ifindex_to_name_ns(ifindex, ns_dev, ns_inode, name)) printf("%s", name); else |