summaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/map.c
diff options
context:
space:
mode:
authorPrashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>2017-11-08 13:55:49 +0900
committerDavid S. Miller <davem@davemloft.net>2017-11-11 12:35:41 +0900
commitc541b73466549c4aa4ee20ccd04ba52e4c95d6eb (patch)
tree4e59243e803a4b26d918c1b79e08107cdd89f2ac /tools/bpf/bpftool/map.c
parent4990f1f4610b483a60397ed2768d268df228a551 (diff)
downloadblackbird-obmc-linux-c541b73466549c4aa4ee20ccd04ba52e4c95d6eb.tar.gz
blackbird-obmc-linux-c541b73466549c4aa4ee20ccd04ba52e4c95d6eb.zip
tools: bpftool: optionally show filenames of pinned objects
Making it optional to show file names of pinned objects because it scans complete bpf-fs filesystem which is costly. Added option -f|--bpffs. Documentation updated. Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/bpf/bpftool/map.c')
-rw-r--r--tools/bpf/bpftool/map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index de0980657cef..e2450c8e88e6 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
@@ -497,7 +497,8 @@ static int do_show(int argc, char **argv)
int err;
int fd;
- build_pinned_obj_table(&map_table, BPF_OBJ_MAP);
+ if (show_pinned)
+ build_pinned_obj_table(&map_table, BPF_OBJ_MAP);
if (argc == 2) {
fd = map_parse_fd_and_info(&argc, &argv, &info, &len);
OpenPOWER on IntegriCloud