Skip to content

bpftool: Consume ring buffer maps with event_pipe

Tianyi Chen bpf linux-kselftest 4 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesApplied 2/2
  2. v42 patches 1 replySuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Suppress cpu/index completion after selecting a ring buffer map by id, name or pinned path, using _bpftool_map_guess_map_type(). Keep the existing suggestions for perf event arrays and unresolved map types.
- Rebase onto current bpf-next. No other changes from v4.

Patches in v5 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpftool: Read ring buffer maps with event_pipetools/bpf/bpftool/Documentation/bpftool-map.rst tools/bpf/bpftool/bash-completion/bpftool tools/bpf/bpftool/map_perf_ring.c+112 -481 replyApplied
2/2selftests/bpf: Cover bpftool ring buffer event_pipetools/testing/selftests/bpf/bpftool_helpers.c tools/testing/selftests/bpf/bpftool_helpers.h tools/testing/selftests/bpf/prog_tests/bpftool_ringbuf.c +1 more+466 -10 repliesApplied

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchQuentin Monnet
SeriesA-b
1/2T-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH bpf-next v5 0/2] bpftool: Consume ring buffer maps with event_pipe

Extend map event_pipe to consume BPF ring buffer records, with plain and JSON output and focused tests for records, shutdown and invalid arguments.

Changes in v5:
- Suppress cpu/index completion after selecting a ring buffer map by id, name or pinned path, using _bpftool_map_guess_map_type(). Keep the existing suggestions for perf event arrays and unresolved map types.
- Rebase onto current bpf-next. No other changes from v4.

This addresses the v4 review:
https://lore.kernel.org/r/a89e2e325b87c215e0fb6e4a24284922d7656cfc0e2a247f0c8c1cd823764c23@mail.kernel.org

Built bpftool and reran all 18 ringbuf subtests against it in an x86-64 VM; all passed. Also checked completion against live ringbuf and perf_event_array maps by id, name and pinned path, plus unresolved maps and already-specified selectors with mocked output.

v4: https://lore.kernel.org/r/[email protected]

Tianyi Chen (2):
bpftool: Read ring buffer maps with event_pipe selftests/bpf: Cover bpftool ring buffer event_pipe

 .../bpf/bpftool/Documentation/bpftool-map.rst |  14 +-
 tools/bpf/bpftool/bash-completion/bpftool     |  59 +--
 tools/bpf/bpftool/map_perf_ring.c             |  87 +++-
 tools/testing/selftests/bpf/bpftool_helpers.c |   2 +-
 tools/testing/selftests/bpf/bpftool_helpers.h |   1 +
 .../bpf/prog_tests/bpftool_ringbuf.c          | 417 ++++++++++++++++++
 .../selftests/bpf/progs/bpftool_ringbuf.c     |  47 ++
 7 files changed, 578 insertions(+), 49 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/bpftool_ringbuf.c
 create mode 100644 tools/testing/selftests/bpf/progs/bpftool_ringbuf.c

base-commit: 48ea1ba704aa3a9975e917411ee05bbe67d65744

Signature · 1 line
2.55.0