diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-12-27 21:39:10 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-31 10:12:23 -0500 |
commit | 522622104ebabbc3372d2fad706b4d30cee13319 (patch) | |
tree | 3be32b64c434196ddab3ab47693552aa1eaf7834 /tools/bpf/bpftool/prog.c | |
parent | 675fc275a3a2d905535207237402c6d8dcb5fa4b (diff) |
tools: bpftool: report device information for offloaded programs
Print the just-exposed device information about device to which
program is bound.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/prog.c')
-rw-r--r-- | tools/bpf/bpftool/prog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index fd0873178503..98f871ed53d6 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c | |||
@@ -230,6 +230,8 @@ static void print_prog_json(struct bpf_prog_info *info, int fd) | |||
230 | info->tag[0], info->tag[1], info->tag[2], info->tag[3], | 230 | info->tag[0], info->tag[1], info->tag[2], info->tag[3], |
231 | info->tag[4], info->tag[5], info->tag[6], info->tag[7]); | 231 | info->tag[4], info->tag[5], info->tag[6], info->tag[7]); |
232 | 232 | ||
233 | print_dev_json(info->ifindex, info->netns_dev, info->netns_ino); | ||
234 | |||
233 | if (info->load_time) { | 235 | if (info->load_time) { |
234 | char buf[32]; | 236 | char buf[32]; |
235 | 237 | ||
@@ -287,6 +289,7 @@ static void print_prog_plain(struct bpf_prog_info *info, int fd) | |||
287 | 289 | ||
288 | printf("tag "); | 290 | printf("tag "); |
289 | fprint_hex(stdout, info->tag, BPF_TAG_SIZE, ""); | 291 | fprint_hex(stdout, info->tag, BPF_TAG_SIZE, ""); |
292 | print_dev_plain(info->ifindex, info->netns_dev, info->netns_ino); | ||
290 | printf("\n"); | 293 | printf("\n"); |
291 | 294 | ||
292 | if (info->load_time) { | 295 | if (info->load_time) { |