selftests/bpf: lazy-load trigger bench BPF programs
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 26 Mar 2024 16:21:49 +0000 (09:21 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 29 Mar 2024 01:31:40 +0000 (18:31 -0700)
commitb4ccf9158f5893dedb898687272fabfe80f58907
tree83864944c3c44f20a8e26b779ea7bb7b10f4e57b
parent208c4391204d25d9178fbc87f216daffad00cd15
selftests/bpf: lazy-load trigger bench BPF programs

Instead of front-loading all possible benchmarking BPF programs for
trigger benchmarks, explicitly specify which BPF programs are used by
specific benchmark and load only it.

This allows to be more flexible in supporting older kernels, where some
program types might not be possible to load (e.g., those that rely on
newly added kfunc).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240326162151.3981687-5-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/benchs/bench_trigger.c
tools/testing/selftests/bpf/progs/trigger_bench.c