Skip to content

KFunc bpf_cpumask_populate

v6.15

Populate the CPU mask from the contents of a BPF memory region.

Definition

Parameters

cpumask: The cpumask being populated.

src: The BPF memory holding the bit pattern.

src__sz: Length of the BPF memory region in bytes.

Returns

  • 0 if the struct cpumask * instance was populated successfully.
  • -EACCES if the memory region is too small to populate the cpumask.
  • -EINVAL if the memory region is not aligned to the size of a long and the architecture does not support efficient unaligned accesses.

Signature

int bpf_cpumask_populate(struct cpumask *cpumask, void *src, size_t src__sz)

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