aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2019-01-17 15:27:50 +0000
committerAlexei Starovoitov <ast@kernel.org>2019-01-22 22:15:40 -0800
commit49eb7ab3b2b5a106307494d2a46248ecb1530578 (patch)
treecab3e6a5ae00f54acb4e43fbfa9d74497ee075bb /tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
parentbpf: fix a (false) compiler warning (diff)
downloadlinux-dev-49eb7ab3b2b5a106307494d2a46248ecb1530578.tar.xz
linux-dev-49eb7ab3b2b5a106307494d2a46248ecb1530578.zip
tools: bpftool: add basic probe capability, probe syscall availability
Add a new component and command for bpftool, in order to probe the system to dump a set of eBPF-related parameters so that users can know what features are available on the system. Parameters are dumped in plain or JSON output (with -j/-p options). The current patch introduces probing of one simple parameter: availability of the bpf() system call. Later commits will add other probes. Sample output: # bpftool feature probe kernel Scanning system call availability... bpf() syscall is available # bpftool --json --pretty feature probe kernel { "syscall_config": { "have_bpf_syscall": true } } The optional "kernel" keyword enforces probing of the current system, which is the only possible behaviour at this stage. It can be safely omitted. The feature comes with the relevant man page, but bash completion will come in a dedicated commit. v3: - Do not probe kernel version. Contrarily to what is written below for v2, we can have the kernel version retrieved in libbpf instead of bpftool (in the patch adding probing for program types). v2: - Remove C-style macros output from this patch. - Even though kernel version is no longer needed for testing kprobes availability, note that we still collect it in this patch so that bpftool gets able to probe (in next patches) older kernels as well. Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/Documentation/bpftool-cgroup.rst')
-rw-r--r--tools/bpf/bpftool/Documentation/bpftool-cgroup.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/Documentation/bpftool-cgroup.rst b/tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
index d07ccf8a23f7..d43fce568ef7 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-cgroup.rst
@@ -142,5 +142,6 @@ SEE ALSO
**bpftool**\ (8),
**bpftool-prog**\ (8),
**bpftool-map**\ (8),
+ **bpftool-feature**\ (8),
**bpftool-net**\ (8),
**bpftool-perf**\ (8)