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

From: Yonghong Song
Date: Thu Dec 07 2023 - 23:38:02 EST



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@xxxxxxxxxxxxx>

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