bpf: add bpf_modify_return_test_tp() kfunc triggering tracepoint
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 26 Mar 2024 16:21:50 +0000 (09:21 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 29 Mar 2024 01:31:40 +0000 (18:31 -0700)
commit3124591f686115aca25d772c2ccb7b1e202c3197
treee761705a15312f4cf7423a40035c3e78bb8e4901
parentb4ccf9158f5893dedb898687272fabfe80f58907
bpf: add bpf_modify_return_test_tp() kfunc triggering tracepoint

Add a simple bpf_modify_return_test_tp() kfunc, available to all program
types, that is useful for various testing and benchmarking scenarios, as
it allows to trigger most tracing BPF program types from BPF side,
allowing to do complex testing and benchmarking scenarios.

It is also attachable to for fmod_ret programs, making it a good and
simple way to trigger fmod_ret program under test/benchmark.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240326162151.3981687-6-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/trace/events/bpf_test_run.h
kernel/bpf/helpers.c
net/bpf/test_run.c