Commit 064a07cb authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Daniel Borkmann

tools: bpftool: report device information for offloaded maps

Print the information about device on which map is created.
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent 52775b33
...@@ -428,6 +428,9 @@ static int show_map_close_json(int fd, struct bpf_map_info *info) ...@@ -428,6 +428,9 @@ static int show_map_close_json(int fd, struct bpf_map_info *info)
jsonw_name(json_wtr, "flags"); jsonw_name(json_wtr, "flags");
jsonw_printf(json_wtr, "%#x", info->map_flags); jsonw_printf(json_wtr, "%#x", info->map_flags);
print_dev_json(info->ifindex, info->netns_dev, info->netns_ino);
jsonw_uint_field(json_wtr, "bytes_key", info->key_size); jsonw_uint_field(json_wtr, "bytes_key", info->key_size);
jsonw_uint_field(json_wtr, "bytes_value", info->value_size); jsonw_uint_field(json_wtr, "bytes_value", info->value_size);
jsonw_uint_field(json_wtr, "max_entries", info->max_entries); 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,7 +472,9 @@ static int show_map_close_plain(int fd, struct bpf_map_info *info)
if (*info->name) if (*info->name)
printf("name %s ", info->name); printf("name %s ", info->name);
printf("flags 0x%x\n", info->map_flags); printf("flags 0x%x", info->map_flags);
print_dev_plain(info->ifindex, info->netns_dev, info->netns_ino);
printf("\n");
printf("\tkey %uB value %uB max_entries %u", printf("\tkey %uB value %uB max_entries %u",
info->key_size, info->value_size, info->max_entries); info->key_size, info->value_size, info->max_entries);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment