Skip to content

KFunc bpf_iter_bits_new

v6.11

Initialize a new bits iterator for a given memory area

Definition

This function initializes a new bpf_iter_bits structure for iterating over a memory area which is specified by the unsafe_ptr__ign and nr_words. It copies the data of the memory area to the newly created bpf_iter_bits it for subsequent iteration operations.

Parameters

it: The new bpf_iter_bits to be created

unsafe_ptr__ign: A pointer pointing to a memory area to be iterated over

nr_words: The size of the specified memory area, measured in 8-byte units. Due to the limitation of memalloc, it can't be greater than 512.

Return

On success, 0 is returned. On failure, ERR is returned.

int bpf_iter_bits_new(struct bpf_iter_bits *it, const u64 *unsafe_ptr__ign, u32 nr_words)

Usage

Docs could be improved

This part of the docs is incomplete, contributions are very welcome

Program types

The following program types can make use of this kfunc:

Example

Docs could be improved

This part of the docs is incomplete, contributions are very welcome