diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2024-08-08 16:22:29 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-08-21 10:37:52 -0700 |
commit | baebe9aaba1e59e34cd1fe6455bb4c3029ad3bc1 (patch) | |
tree | 4f82bb8495a612d772caea6ea667d99fcd94bf31 /tools/testing/selftests/bpf/prog_tests/async_stack_depth.c | |
parent | 496ddd19a0fad22f250fc7a7b7a8000155418934 (diff) |
bpf: allow passing struct bpf_iter_<type> as kfunc arguments
There are potentially useful cases where a specific iterator type might
need to be passed into some kfunc. So, in addition to existing
bpf_iter_<type>_{new,next,destroy}() kfuncs, allow to pass iterator
pointer to any kfunc.
We employ "__iter" naming suffix for arguments that are meant to accept
iterators. We also enforce that they accept PTR -> STRUCT btf_iter_<type>
type chain and point to a valid initialized on-the-stack iterator state.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240808232230.2848712-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/async_stack_depth.c')
0 files changed, 0 insertions, 0 deletions