BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v5 0/2] bpftool: Consume ring buffer maps with event_pipe
@ 2026-09-21  7:35 Tianyi Chen
  2026-09-21  7:35 ` [PATCH bpf-next v5 1/2] bpftool: Read " Tianyi Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Tianyi Chen @ 2026-09-21  7:35 UTC (permalink / raw)
  To: bpf; +Cc: qmo, andrii, eddyz87, ihor.solodrai, linux-kselftest

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/20260919110721.1230756-1-hi@tychen.cc

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
-- 
2.55.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-21 22:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-21  7:35 [PATCH bpf-next v5 0/2] bpftool: Consume ring buffer maps with event_pipe Tianyi Chen
2026-09-21  7:35 ` [PATCH bpf-next v5 1/2] bpftool: Read " Tianyi Chen
2026-09-21  8:34   ` bot+bpf-ci
2026-09-21  9:23   ` Quentin Monnet
2026-09-21  7:35 ` [PATCH bpf-next v5 2/2] selftests/bpf: Cover bpftool ring buffer event_pipe Tianyi Chen
2026-09-21  8:48   ` bot+bpf-ci
2026-09-21  9:18 ` [PATCH bpf-next v5 0/2] bpftool: Consume ring buffer maps with event_pipe Quentin Monnet
2026-09-21 22:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox