linux-bl808/tools/bpf/bpftool/Documentation
Quentin Monnet 82b8cf0acc tools: bpftool: Print optional built-in features along with version
Bpftool has a number of features that can be included or left aside
during compilation. This includes:

- Support for libbfd, providing the disassembler for JIT-compiled
  programs.
- Support for BPF skeletons, used for profiling programs or iterating on
  the PIDs of processes associated with BPF objects.

In order to make it easy for users to understand what features were
compiled for a given bpftool binary, print the status of the two
features above when showing the version number for bpftool ("bpftool -V"
or "bpftool version"). Document this in the main manual page. Example
invocations:

    $ bpftool version
    ./bpftool v5.9.0-rc1
    features: libbfd, skeletons

    $ bpftool -p version
    {
        "version": "5.9.0-rc1",
        "features": {
            "libbfd": true,
            "skeletons": true
        }
    }

Some other parameters are optional at compilation
("DISASM_FOUR_ARGS_SIGNATURE", LIBCAP support) but they do not impact
significantly bpftool's behaviour from a user's point of view, so their
status is not reported.

Available commands and supported program types depend on the version
number, and are therefore not reported either. Note that they are
already available, albeit without JSON, via bpftool's help messages.

v3:
- Use a simple list instead of boolean values for plain output.

v2:
- Fix JSON (object instead or array for the features).

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200909162500.17010-2-quentin@isovalent.com
2020-09-10 11:16:46 -07:00
..
bpftool-btf.rst tools: bpftool: Log info-level messages when building bpftool man pages 2020-09-10 11:02:45 -07:00
bpftool-cgroup.rst bpf, bpftool: Enable get{peer, sock}name attach types 2020-05-19 11:32:04 -07:00
bpftool-feature.rst
bpftool-gen.rst tools: bpftool: Log info-level messages when building bpftool man pages 2020-09-10 11:02:45 -07:00
bpftool-iter.rst tools/bpftool: Add bpftool support for bpf map element iterator 2020-07-25 20:16:33 -07:00
bpftool-link.rst tools: bpftool: Fix formatting in bpftool-link documentation 2020-09-07 16:31:18 +02:00
bpftool-map.rst tools: bpftool: Log info-level messages when building bpftool man pages 2020-09-10 11:02:45 -07:00
bpftool-net.rst
bpftool-perf.rst
bpftool-prog.rst tools/bpftool: Add name mappings for SK_LOOKUP prog and attach type 2020-07-17 20:18:17 -07:00
bpftool-struct_ops.rst
bpftool.rst tools: bpftool: Print optional built-in features along with version 2020-09-10 11:16:46 -07:00
Makefile tools: bpftool: Log info-level messages when building bpftool man pages 2020-09-10 11:02:45 -07:00