bpf_cpumask_and(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bpf_cpumask_and(9) β€” the Kernel API Manual page you didn't know you needed πŸŽ€

okay so bestie, welcome to the bpf_cpumask_and page from the Kernel API Manual β€” yes, that one, the little corner of the kernel docs that is lowkey iconic. sit down, hydrate, and let's get into it 🌸

✨ NAME ✨

bpf_cpumask_and β€” it ANDs two cpumasks together and stores the result. that's it. that's the whole vibe πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

__bpf_kfunc bool bpf_cpumask_and (struct bpf_cpumask *dst , const struct cpumask *src1 , const struct cpumask *src2 );

literally just three args and a bool coming back at you, no cap ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dst β€” the BPF cpumask where the result is going to live. this is the main character of the operation, the one that gets changed πŸ‘‘
  • src1 β€” the first input. one half of the AND πŸ’œ
  • src2 β€” the second input. the other half. together they slay 🫢

⭐ RETURN ⭐

  • true β€” dst has at least one bit set following the operation. so it's not empty, we love that for us 🌈
  • false β€” dst is empty following the operation. bestie it's giving nothing in there πŸ˜­πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea: struct bpf_cpumask pointers are totally allowed to be safely passed into src1 and src2. like, it's fine. the kernel said so. no stress, no sneaky gotchas, just safe vibes πŸ’…βœ¨


🌸 SEE ALSO 🌸

go check out the kernel file ./kernel/bpf/cpumask.c and honestly just read the whole cpumask friend group, they're all here:


okay that's the page!! this little baddie lives in ./kernel/bpf and it's dated October 2026 β€” write it down, cite it in your essay, frame it, whatever πŸ§šπŸ’– bye bestie, go AND some cpumasks responsibly πŸ“βœ¨

πŸ“¦ where this page comes from