bpf_cpumask_or(9)
π bpf_cpumask_or(9) β the kernel API manual, bestie edition
okay so real talk, this is bpf_cpumask_or(9) from the kernel API manual, and it's lowkey one of the most satisfying little functions ever. it takes two cpumasks, ORs them together, and drops the result somewhere. that's it. that's the whole vibe. β¨
πΈ NAME πΈ
bpf_cpumask_or β OR two cpumasks and store the result. literally just vibes and bitwise logic, no cap.
β¨ SYNOPSIS β¨
__bpf_kfunc void bpf_cpumask_or (struct bpf_cpumask *dst , const struct cpumask *src1 , const struct cpumask *src2 );
she takes three pointers and returns void. no notes. π
π ARGUMENTS π
dstβ the BPF cpumask where the result is being stored. this is the main character, the one who gets to keep the answer. πsrc1β the first input. the og.src2β the second input. the plus-one. π«Ά
π¦ DESCRIPTION π¦
you know how OR works, right? bestie, you do. you take two things, and if either of them is on, the result is on. iconic behaviour honestly.
and the fun part? struct bpf_cpumask pointers may be safely passed to src1 and src2. yes, safely. as in, you're not gonna blow up in your own face. go off. π₯
ngl, "safely passed" is doing a lot of heavy lifting here β it's the one caveat this manpage gives you, so don't get weird with it. π
π SEE ALSO π
Kernel file ./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_xor(9)bpf_cpumask_equal(9)bpf_cpumask_intersects(9)bpf_cpumask_subset(9)bpf_cpumask_empty(9)bpf_cpumask_full(9)bpf_cpumask_copy(9)bpf_cpumask_any_distribute(9)bpf_cpumask_any_and_distribute(9)bpf_cpumask_weight(9)bpf_cpumask_populate(9)
that's the whole friend group right there β go say hi. π
okay that's the page!! this lil icon lives in ./kernel/bpf, and the version notes are dated October 2026 β so mark your calendar, screenshot the group chat, and stan a genuinely unbothered bitwise kfunc. bye bestie, love u, hydrate π
ππΈ
π¦ 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