tools/bpftool: show btf_id in map listing
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Wed, 17 Apr 2019 00:22:59 +0000 (09:22 +0900)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 17 Apr 2019 02:48:26 +0000 (19:48 -0700)
commitd1b7725dfea3e6c1aff2ee94baf3658aba450fbe
tree8af00b98facbc59b1a388f8cc248cf5f61ff3e18
parentd459b59ee0f5ed2fa96e77bbd919e095b1aeceb0
tools/bpftool: show btf_id in map listing

Let's print btf id of map similar to the way we are printing it
for programs.

Sample output:
user@test# bpftool map -f
61: lpm_trie  flags 0x1
key 20B  value 8B  max_entries 1  memlock 4096B
133: array  name test_btf_id  flags 0x0
key 4B  value 4B  max_entries 4  memlock 4096B
pinned /sys/fs/bpf/test100
btf_id 174
170: array  name test_btf_id  flags 0x0
key 4B  value 4B  max_entries 4  memlock 4096B
btf_id 240

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/map.c