Re: [PATCH v3 1/2] bpf: add kfunc for populating cpumask bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 5, 2025 at 8:13 AM Emil Tsalapatis <emil@xxxxxxxxxxxxxxx> wrote:
>
> Add a helper kfunc that sets the bitmap of a bpf_cpumask from BPF memory.
>
> Signed-off-by: Emil Tsalapatis (Meta) <emil@xxxxxxxxxxxxxxx>
> ---
>  kernel/bpf/cpumask.c | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>
> diff --git a/kernel/bpf/cpumask.c b/kernel/bpf/cpumask.c
> index cfa1c18e3a48..2a0770544fc3 100644
> --- a/kernel/bpf/cpumask.c
> +++ b/kernel/bpf/cpumask.c
> @@ -420,6 +420,33 @@ __bpf_kfunc u32 bpf_cpumask_weight(const struct cpumask *cpumask)
>         return cpumask_weight(cpumask);
>  }
>
> +/**
> + * bpf_cpumask_fill() - Populate the CPU mask from the contents of
> + * a BPF memory region.
> + *
> + * @cpumask: The cpumask being populated.
> + * @src: The BPF memory holding the bit pattern.
> + * @src__sz: Length of the BPF memory region in bytes.
> + *
> + */

Since you're adding kdoc, make it complete.
Otherwise there is a warn during the build:

> kernel/bpf/cpumask.c:433: warning: No description found for return value of 'bpf_cpumask_fill'

and while at it, could you fix it for other kfuncs?

kernel/bpf/cpumask.c:50: warning: No description found for return
value of 'bpf_cpumask_create'
kernel/bpf/cpumask.c:76: warning: No description found for return
value of 'bpf_cpumask_acquire'

Thanks!





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux