From: Michal Rostecki <mrostecki@opensuse.org>
To: bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
Quentin Monnet <quentin.monnet@netronome.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org
Subject: [PATCH bpf-next 4/6] bpftool: Update documentation of "bpftool feature" command
Date: Tue, 18 Feb 2020 20:02:21 +0100 [thread overview]
Message-ID: <20200218190224.22508-5-mrostecki@opensuse.org> (raw)
In-Reply-To: <20200218190224.22508-1-mrostecki@opensuse.org>
Update documentation of "bpftool feature" command with information about
new arguments: "section", "filter_in" and "filter_out".
Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
---
.../bpftool/Documentation/bpftool-feature.rst | 37 ++++++++++++++++---
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/tools/bpf/bpftool/Documentation/bpftool-feature.rst b/tools/bpf/bpftool/Documentation/bpftool-feature.rst
index 4d08f35034a2..39b4c47e3c75 100644
--- a/tools/bpf/bpftool/Documentation/bpftool-feature.rst
+++ b/tools/bpf/bpftool/Documentation/bpftool-feature.rst
@@ -19,19 +19,45 @@ SYNOPSIS
FEATURE COMMANDS
================
-| **bpftool** **feature probe** [*COMPONENT*] [**macros** [**prefix** *PREFIX*]]
+| **bpftool** **feature probe** [*COMPONENT*] [**section** *SECTION*] [**filter_in** *PATTERN*] [**filter_out** *PATTERN*] [**macros** [**prefix** *PREFIX*]]
| **bpftool** **feature help**
|
| *COMPONENT* := { **kernel** | **dev** *NAME* }
+| *SECTION* := { **system_config** | **syscall_config** | **program_types** | **map_types** | **helpers** | **misc** }
DESCRIPTION
===========
- **bpftool feature probe** [**kernel**] [**macros** [**prefix** *PREFIX*]]
+ **bpftool feature probe** [**kernel**] [**section** *SECTION*] [**filter_in** *PATTERN*] [**filter_out** *PATTERN*] [**macros** [**prefix** *PREFIX*]]
Probe the running kernel and dump a number of eBPF-related
parameters, such as availability of the **bpf()** system call,
JIT status, eBPF program types availability, eBPF helper
functions availability, and more.
+ If the **section** keyword is passed, only the specified
+ probes section will be checked and printed. The only probe
+ which is always going to be performed is **syscall_config**,
+ but if the other section was provided as an argument,
+ **syscall_config** check will perform silently without
+ printing the result and bpftool will exit if the **bpf()**
+ syscall is not available (because in that case performing
+ other checks relying on the **bpf()** system call does not
+ make sense).
+
+ If the **filter_in** keyword is passed, only checks with
+ names matching the given *PATTERN* are going the be printed
+ and performed.
+
+ If the **filter_out** keyword is passed, checks with names
+ matching the given *PATTERN* are not going to be printed and
+ performed.
+
+ Please refer to the **regex**\ (7) man page for details on
+ the syntax for *PATTERN*.
+
+ **filter_in** is executed before **filter_out** which means
+ that **filter_out** is always applied only on probes
+ selected by **filter_in** if both arguments are used together.
+
If the **macros** keyword (but not the **-j** option) is
passed, a subset of the output is dumped as a list of
**#define** macros that are ready to be included in a C
@@ -48,12 +74,13 @@ DESCRIPTION
**bpf_trace_printk**\ () or **bpf_probe_write_user**\ ()) may
print warnings to kernel logs.
- **bpftool feature probe dev** *NAME* [**macros** [**prefix** *PREFIX*]]
+ **bpftool feature probe dev** *NAME* [**section** *SECTION*] [**filter_in** *PATTERN*] [**filter_out** *PATTERN*] [**macros** [**prefix** *PREFIX*]]
Probe network device for supported eBPF features and dump
results to the console.
- The two keywords **macros** and **prefix** have the same
- role as when probing the kernel.
+ The keywords **section**, **filter_in**, **filter_out**,
+ **macros** and **prefix** have the same role as when probing
+ the kernel.
**bpftool feature help**
Print short help message.
--
2.25.0
next prev parent reply other threads:[~2020-02-18 19:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 19:02 [PATCH bpf-next 0/6] bpftool: Allow to select sections and filter probes Michal Rostecki
2020-02-18 19:02 ` [PATCH bpf-next 1/6] bpftool: Move out sections to separate functions Michal Rostecki
2020-02-18 19:02 ` [PATCH bpf-next 2/6] bpftool: Allow to select a specific section to probe Michal Rostecki
2020-02-18 19:02 ` [PATCH bpf-next 3/6] bpftool: Add arguments for filtering in and filtering out probes Michal Rostecki
2020-02-18 19:02 ` Michal Rostecki [this message]
2020-02-18 19:02 ` [PATCH bpf-next 5/6] bpftool: Update bash completion for "bpftool feature" command Michal Rostecki
2020-02-18 19:02 ` [PATCH bpf-next 6/6] selftests/bpf: Add test " Michal Rostecki
2020-02-19 3:02 ` [PATCH bpf-next 0/6] bpftool: Allow to select sections and filter probes Alexei Starovoitov
2020-02-19 12:33 ` Michal Rostecki
2020-02-19 16:37 ` Alexei Starovoitov
2020-02-19 16:52 ` Daniel Borkmann
2020-02-19 20:57 ` Michal Rostecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200218190224.22508-5-mrostecki@opensuse.org \
--to=mrostecki@opensuse.org \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quentin.monnet@netronome.com \
--cc=shuah@kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).