bpf_cpumask_copy(9)
π bpf_cpumask_copy(9) β from the Kernel API Manual π
okay so bestie, picture this: you've got a cpumask, right? and you want it inside a BPF cpumask. that's literally the whole plot. this little kfunc is the copy-paste of the kernel world and honestly? she ate. π
β¨ SYNOPSIS β¨
__bpf_kfunc void bpf_cpumask_copy (struct bpf_cpumask *dst , const
struct cpumask *src );
no cap, that's the whole signature. two pointers, zero drama. π
π«Ά ARGUMENTS π«Ά
dstβ the BPF cpumask you're copying into. she's the destination, the main character, the one getting the glow-up. β¨srcβ the cpumask you're copying from. the source material. iconic, but not the one being written to.
πΈ DESCRIPTION πΈ
so what does it actually do? it copies the contents of a cpumask into a BPF cpumask. that's it. that's the vibe check passed. π¦
and here's the tea: a struct bpf_cpumask pointer may be safely passed to src. lowkey a nice little convenience, highkey worth remembering β you don't have to stress about that one. π
β οΈ note bestie: the manual gives us exactly that one line of description and nothing more, so no extra lore, no secret tricks. we report, we don't invent. periodt. π
π SEE ALSO π
like, the whole friend group. seriously, the entire cpumask clique shows up:
./kernel/bpf/cpumask.cstruct bpf_cpumask(9)bpf_cpumask_create(9)bpf_cpumask_acquire(9)bpf_cpumask_release(9)bpf_cpumask_first(9)bpf_cpumask_first_zero(9)bpf_cpumask_first_and(9)bpf_cpumask_set_cpu(9)bpf_cpumask_clear_cpu(9)bpf_cpumask_test_cpu(9)bpf_cpumask_test_and_set_cpu(9)bpf_cpumask_test_and_clear_cpu(9)bpf_cpumask_setall(9)bpf_cpumask_clear(9)bpf_cpumask_and(9)bpf_cpumask_or(9)bpf_cpumask_xor(9)bpf_cpumask_equal(9)bpf_cpumask_intersects(9)bpf_cpumask_subset(9)bpf_cpumask_empty(9)bpf_cpumask_full(9)bpf_cpumask_any_distribute(9)bpf_cpumask_any_and_distribute(9)bpf_cpumask_weight(9)bpf_cpumask_populate(9)
go read them all, i'll wait. π
and that's the page! shipped from ./kernel/bpf, dated October 2026, straight out of the Kernel API Manual. ty for coming to my ted talk, mwah ππ§ββοΈβ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms