Re: [PATCH bpf-next 1/2] bpf: Add bpf_cpumask_weight() kfunc

Yonghong Song
2023-12-08T04:38:02Z

On 12/7/23 1:08 PM, David Vernet wrote:
> It can be useful to query how many bits are set in a cpumask. For
> example, if you want to perform special logic for the last remaining
> core that's set in a mask. Let's therefore add a new
> bpf_cpumask_weight() kfunc which checks how many bits are set in a mask.
>
> Signed-off-by: David Vernet <void@manifault.com>

Acked-by: Yonghong Song <yonghong.song@linux.dev>