Skip to content

KFunc bpf_cpumask_any_and_distribute

v6.5

Return a random set CPU from the AND of two CPU-masks.

Definition

src1: The first CPU-mask. src2: The second CPU-mask.

Return: * A random set bit within [0, num_cpus) from the AND of two CPU-mask, if at least one bit is set. * >= num_cpus if no bit is set.

struct bpf_cpumask pointers may be safely passed to src1 and src2.

u32 bpf_cpumask_any_and_distribute(const struct cpumask *src1, const struct cpumask *src2)

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