Skip to content

switch samples and tests to libbpf perf buffer API

Andrii Nakryiko bpf netdev 2 versions Applied

Status from this message: Applied. Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesApplied
  2. v15 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- make logging message one long line instead of two (Song).

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/5selftests/bpf: convert test_get_stack_raw_tp to perf_buffer APItools/testing/selftests/bpf/prog_tests/get_stack_raw_tp.c tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c+44 -361 reply
2/5selftests/bpf: switch test_tcpnotify to perf_buffer APItools/testing/selftests/bpf/test_tcpnotify_user.c+36 -540 replies
3/5samples/bpf: convert xdp_sample_pkts_user to perf_buffer APIsamples/bpf/xdp_sample_pkts_user.c+17 -440 replies
4/5samples/bpf: switch trace_output sample to perf_buffer APIsamples/bpf/trace_output_user.c+14 -290 replies
5/5selftests/bpf: remove perf buffer helperstools/testing/selftests/bpf/trace_helpers.c tools/testing/selftests/bpf/trace_helpers.h+0 -1340 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchSong LiuToke Høiland-Jørgensen
1/5A-b
2/5A-b
3/5A-b A-b
4/5A-b
5/5A-b

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

Read the v2 thread

Cover letter [PATCH v2 bpf-next 0/5] switch samples and tests to libbpf perf buffer API

There were few more tests and samples that were using custom perf buffer setup code from trace_helpers.h. This patch set gets rid of all the usages of those and removes helpers themselves. Libbpf provides nicer, but equally powerful set of APIs to work with perf ring buffers, so let's have all the samples use

v1->v2:
- make logging message one long line instead of two (Song).

Andrii Nakryiko (5):
selftests/bpf: convert test_get_stack_raw_tp to perf_buffer API selftests/bpf: switch test_tcpnotify to perf_buffer API samples/bpf: convert xdp_sample_pkts_user to perf_buffer API samples/bpf: switch trace_output sample to perf_buffer API selftests/bpf: remove perf buffer helpers

 samples/bpf/trace_output_user.c               |  43 ++----
 samples/bpf/xdp_sample_pkts_user.c            |  61 +++------
 .../bpf/prog_tests/get_stack_raw_tp.c         |  78 ++++++-----
 .../bpf/progs/test_get_stack_rawtp.c          |   2 +-
 .../selftests/bpf/test_tcpnotify_user.c       |  90 +++++--------
 tools/testing/selftests/bpf/trace_helpers.c   | 125 ------------------
 tools/testing/selftests/bpf/trace_helpers.h   |   9 --
 7 files changed, 111 insertions(+), 297 deletions(-)
Signature · 1 line
2.17.1