Skip to content

KFunc bpf_cpumask_any_distribute

v6.5

Return a random set CPU from a CPU-mask.

Definition

cpumask: The CPU-mask being queried.

Return: * A random set bit within [0, num_cpus) if at least one bit is set. * >= num_cpus if no bit is set.

A struct bpf_cpumask pointer may be safely passed to src.

u32 bpf_cpumask_any_distribute(const struct cpumask *cpumask)

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