summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/Documentation/bpftool-map.rst
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2017-10-23 19:24:16 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-24 03:25:09 +0300
commit0641c3c890d480abeb237b92a5ee4b99a22319c6 (patch)
treefa110252dc155ff8a5f29fbd2d00d641aeef45ae /tools/bpf/bpftool/Documentation/bpftool-map.rst
parent47ff7ac6d706c6f08153294c87287aeec183b211 (diff)
downloadlinux-0641c3c890d480abeb237b92a5ee4b99a22319c6.tar.xz
tools: bpftool: update documentation for --json and --pretty usage
Update the documentation to provide help about JSON output generation, and add an example in bpftool-prog manual page. Also reintroduce an example that was left aside when the tool was moved from GitHub to the kernel sources, in order to show how to mount the bpffs file system (to pin programs) inside the bpftool-prog manual page. Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/bpf/bpftool/Documentation/bpftool-map.rst')
-rw-r--r--tools/bpf/bpftool/Documentation/bpftool-map.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/Documentation/bpftool-map.rst b/tools/bpf/bpftool/Documentation/bpftool-map.rst
index 3954b3ea4f26..abb9ee940b15 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-map.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-map.rst
@@ -10,7 +10,9 @@ tool for inspection and simple manipulation of eBPF maps
SYNOPSIS
========
- **bpftool** **map** *COMMAND*
+ **bpftool** [*OPTIONS*] **map** *COMMAND*
+
+ *OPTIONS* := { { **-j** | **--json** } [{ **-p** | **--pretty** }] }
*COMMANDS* :=
{ **show** | **dump** | **update** | **lookup** | **getnext** | **delete**
@@ -77,6 +79,13 @@ OPTIONS
-v, --version
Print version number (similar to **bpftool version**).
+ -j, --json
+ Generate JSON output. For commands that cannot produce JSON, this
+ option has no effect.
+
+ -p, --pretty
+ Generate human-readable JSON output. Implies **-j**.
+
EXAMPLES
========
**# bpftool map show**