From: Kumar Kartikeya Dwivedi Date: Tue, 9 Aug 2022 21:30:31 +0000 (+0200) Subject: bpf: Allow calling bpf_prog_test kfuncs in tracing programs X-Git-Tag: v6.1-rc5~618^2~14^2~3^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f0752628e76bb3a02109dbd980381f27060ba92;p=platform%2Fkernel%2Flinux-starfive.git bpf: Allow calling bpf_prog_test kfuncs in tracing programs In addition to TC hook, enable these in tracing programs so that they can be used in selftests. Acked-by: Yonghong Song Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20220809213033.24147-2-memxor@gmail.com Signed-off-by: Alexei Starovoitov --- diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c index cbc9cd5..d112093 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -1628,6 +1628,7 @@ static int __init bpf_prog_test_run_init(void) int ret; ret = register_btf_kfunc_id_set(BPF_PROG_TYPE_SCHED_CLS, &bpf_prog_test_kfunc_set); + ret = ret ?: register_btf_kfunc_id_set(BPF_PROG_TYPE_TRACING, &bpf_prog_test_kfunc_set); return ret ?: register_btf_id_dtor_kfuncs(bpf_prog_test_dtor_kfunc, ARRAY_SIZE(bpf_prog_test_dtor_kfunc), THIS_MODULE);