diff options
author | Yafang Shao <[email protected]> | 2024-05-17 10:30:33 +0800 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2024-05-29 16:01:47 -0700 |
commit | 4665415975b0827e9646cab91c61d02a6b364d59 (patch) | |
tree | 9b717740936f9082b47ef0e0209816dc8de26658 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | fbe3e8473f391adbf67eb0f317305fe62c66096c (diff) |
bpf: Add bits iterator
Add three new kfuncs for the bits iterator:
- bpf_iter_bits_new
Initialize a new bits iterator for a given memory area. Due to the
limitation of bpf memalloc, the max number of words (8-byte units) that
can be iterated over is limited to (4096 / 8).
- bpf_iter_bits_next
Get the next bit in a bpf_iter_bits
- bpf_iter_bits_destroy
Destroy a bpf_iter_bits
The bits iterator facilitates the iteration of the bits of a memory area,
such as cpumask. It can be used in any context and on any address.
Signed-off-by: Yafang Shao <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions