bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 0/6] bpftool: Allow to select sections and filter probes
Date: Tue, 18 Feb 2020 20:02:17 +0100	[thread overview]
Message-ID: <20200218190224.22508-1-mrostecki@opensuse.org> (raw)

This patch series extend the "bpftool feature" subcommand with the
new positional arguments:

- "section", which allows to select a specific section of probes (i.e.
  "system_config", "program_types", "map_types");
- "filter_in", which allows to select only probes which matches the
  given regex pattern;
- "filter_out", which allows to filter out probes which do not match the
  given regex pattern.

The main motivation behind those changes is ability the fact that some
probes (for example those related to "trace" or "write_user" helpers)
emit dmesg messages which might be confusing for people who are running
on production environments. For details see the Cilium issue[0].

[0] https://github.com/cilium/cilium/issues/10048

Michal Rostecki (6):
  bpftool: Move out sections to separate functions
  bpftool: Allow to select a specific section to probe
  bpftool: Add arguments for filtering in and filtering out probes
  bpftool: Update documentation of "bpftool feature" command
  bpftool: Update bash completion for "bpftool feature" command
  selftests/bpf: Add test for "bpftool feature" command

 .../bpftool/Documentation/bpftool-feature.rst |  37 +-
 tools/bpf/bpftool/bash-completion/bpftool     |  32 +-
 tools/bpf/bpftool/feature.c                   | 592 +++++++++++++-----
 tools/testing/selftests/.gitignore            |   5 +-
 tools/testing/selftests/bpf/Makefile          |   3 +-
 tools/testing/selftests/bpf/test_bpftool.py   | 294 +++++++++
 tools/testing/selftests/bpf/test_bpftool.sh   |   5 +
 7 files changed, 811 insertions(+), 157 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/test_bpftool.py
 create mode 100755 tools/testing/selftests/bpf/test_bpftool.sh

-- 
2.25.0


             reply	other threads:[~2020-02-18 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 19:02 Michal Rostecki [this message]
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 ` [PATCH bpf-next 4/6] bpftool: Update documentation of "bpftool feature" command Michal Rostecki
2020-02-18 19:02 ` [PATCH bpf-next 5/6] bpftool: Update bash completion for " 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-1-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).