]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: test passing iterator to a kfunc
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 8 Aug 2024 23:22:30 +0000 (16:22 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 21 Aug 2024 17:37:52 +0000 (10:37 -0700)
commitb0cd726f9a8279b33faa5b4b0011df14f331fb33
treea9b245d25a12cf4eedacd62ca1afe12167119567
parentbaebe9aaba1e59e34cd1fe6455bb4c3029ad3bc1
selftests/bpf: test passing iterator to a kfunc

Define BPF iterator "getter" kfunc, which accepts iterator pointer as
one of the arguments. Make sure that argument passed doesn't have to be
the very first argument (unlike new-next-destroy combo).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240808232230.2848712-4-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
tools/testing/selftests/bpf/progs/iters_testmod_seq.c