All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 bpf-next 0/3] enable BPF_PROG_TEST_RUN for raw_tp
@ 2020-09-23 16:53 Song Liu
  2020-09-23 16:53 ` [PATCH v2 bpf-next 1/3] bpf: enable BPF_PROG_TEST_RUN for raw_tracepoint Song Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Song Liu @ 2020-09-23 16:53 UTC (permalink / raw)
  To: netdev, bpf; +Cc: kernel-team, ast, daniel, john.fastabend, kpsingh, Song Liu

This set enables BPF_PROG_TEST_RUN for raw_tracepoint type programs. This
set also enables running the raw_tp program on a specific CPU. This feature
can be used by user space to trigger programs that access percpu resources,
e.g. perf_event, percpu variables.

Changes v1 => v2:
1. More checks for retval in the selftest. (John)
2. Remove unnecessary goto in bpf_prog_test_run_raw_tp. (John)

Song Liu (3):
  bpf: enable BPF_PROG_TEST_RUN for raw_tracepoint
  libbpf: introduce bpf_prog_test_run_xattr_opts
  selftests/bpf: add raw_tp_test_run

 include/linux/bpf.h                           |  3 +
 include/uapi/linux/bpf.h                      |  5 ++
 kernel/bpf/syscall.c                          |  2 +-
 kernel/trace/bpf_trace.c                      |  1 +
 net/bpf/test_run.c                            | 88 +++++++++++++++++++
 tools/include/uapi/linux/bpf.h                |  5 ++
 tools/lib/bpf/bpf.c                           | 13 ++-
 tools/lib/bpf/bpf.h                           | 11 +++
 tools/lib/bpf/libbpf.map                      |  1 +
 .../bpf/prog_tests/raw_tp_test_run.c          | 73 +++++++++++++++
 .../bpf/progs/test_raw_tp_test_run.c          | 26 ++++++
 11 files changed, 226 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/raw_tp_test_run.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_raw_tp_test_run.c

--
2.24.1

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

end of thread, other threads:[~2020-09-24  1:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 16:53 [PATCH v2 bpf-next 0/3] enable BPF_PROG_TEST_RUN for raw_tp Song Liu
2020-09-23 16:53 ` [PATCH v2 bpf-next 1/3] bpf: enable BPF_PROG_TEST_RUN for raw_tracepoint Song Liu
2020-09-23 19:36   ` Andrii Nakryiko
2020-09-23 21:59     ` Song Liu
2020-09-23 16:54 ` [PATCH v2 bpf-next 2/3] libbpf: introduce bpf_prog_test_run_xattr_opts Song Liu
2020-09-23 19:31   ` Andrii Nakryiko
2020-09-23 22:04     ` Song Liu
2020-09-23 23:53     ` Song Liu
2020-09-24  1:11       ` Andrii Nakryiko
2020-09-24  1:20         ` Song Liu
2020-09-23 16:54 ` [PATCH v2 bpf-next 3/3] selftests/bpf: add raw_tp_test_run Song Liu
2020-09-23 19:40   ` Andrii Nakryiko
2020-09-23 21:30     ` Song Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.