diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-01-17 22:13:29 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-01-18 16:54:25 -0500 |
commit | 064a07cba2919bcfbadf9edf5c26c740e69fa585 (patch) | |
tree | 6074bc6d6bdf6baf5f9ef2476d0250b24edc5316 /tools | |
parent | 52775b33bb5072fbc07b02c0cf4fe8da1f7ee7cd (diff) |
tools: bpftool: report device information for offloaded maps
Print the information about device on which map is created.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bpf/bpftool/map.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index 8d7db9d6b9cd..a152c1a5c94c 100644 --- a/tools/bpf/bpftool/map.c +++ b/tools/bpf/bpftool/map.c | |||
@@ -428,6 +428,9 @@ static int show_map_close_json(int fd, struct bpf_map_info *info) | |||
428 | 428 | ||
429 | jsonw_name(json_wtr, "flags"); | 429 | jsonw_name(json_wtr, "flags"); |
430 | jsonw_printf(json_wtr, "%#x", info->map_flags); | 430 | jsonw_printf(json_wtr, "%#x", info->map_flags); |
431 | |||
432 | print_dev_json(info->ifindex, info->netns_dev, info->netns_ino); | ||
433 | |||
431 | jsonw_uint_field(json_wtr, "bytes_key", info->key_size); | 434 | jsonw_uint_field(json_wtr, "bytes_key", info->key_size); |
432 | jsonw_uint_field(json_wtr, "bytes_value", info->value_size); | 435 | jsonw_uint_field(json_wtr, "bytes_value", info->value_size); |
433 | jsonw_uint_field(json_wtr, "max_entries", info->max_entries); | 436 | jsonw_uint_field(json_wtr, "max_entries", info->max_entries); |
@@ -469,7 +472,9 @@ static int show_map_close_plain(int fd, struct bpf_map_info *info) | |||
469 | if (*info->name) | 472 | if (*info->name) |
470 | printf("name %s ", info->name); | 473 | printf("name %s ", info->name); |
471 | 474 | ||
472 | printf("flags 0x%x\n", info->map_flags); | 475 | printf("flags 0x%x", info->map_flags); |
476 | print_dev_plain(info->ifindex, info->netns_dev, info->netns_ino); | ||
477 | printf("\n"); | ||
473 | printf("\tkey %uB value %uB max_entries %u", | 478 | printf("\tkey %uB value %uB max_entries %u", |
474 | info->key_size, info->value_size, info->max_entries); | 479 | info->key_size, info->value_size, info->max_entries); |
475 | 480 | ||