bpf: Add bpf_cpumask_first_and() kfunc
authorDavid Vernet <void@manifault.com>
Sat, 10 Jun 2023 03:50:49 +0000 (22:50 -0500)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 12 Jun 2023 22:09:11 +0000 (15:09 -0700)
commit5ba3a7a851e3ebffc4cb8f052a4581c4d8af3ae3
tree3caa422cc04ee82bf152d7e4595fa8cdf10301dc
parentba49f976885869835a1783863376221dc24f1817
bpf: Add bpf_cpumask_first_and() kfunc

We currently provide bpf_cpumask_first(), bpf_cpumask_any(), and
bpf_cpumask_any_and() kfuncs. bpf_cpumask_any() and
bpf_cpumask_any_and() are confusing misnomers in that they actually just
call cpumask_first() and cpumask_first_and() respectively.

We'll replace them with bpf_cpumask_any_distribute() and
bpf_cpumask_any_distribute_and() kfuncs in a subsequent patch, so let's
ensure feature parity by adding a bpf_cpumask_first_and() kfunc to
account for bpf_cpumask_any_and() being removed.

Signed-off-by: David Vernet <void@manifault.com>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/r/20230610035053.117605-1-void@manifault.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/cpumask.c