bpf_cpumask_subset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ bpf_cpumask_subset(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’– you're about to learn bpf_cpumask_subset, which is genuinely one of the friendliest little kfuncs in the whole cpumask friend group. it's giving "am I a subset of you or not, be honest" energy 🫢


🌸 NAME 🌸

bpf_cpumask_subset β€” check if a cpumask is a subset of another.

like. is every single bit of one mask chillin' inside the other one? that's the whole job. iconic honestly πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

__bpf_kfunc bool bpf_cpumask_subset (const struct cpumask *src1 , const
       struct cpumask *src2 );

that's it. two pointers, one bool back. no cap, that's the entire vibe ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • src1 β€” the first cpumask, aka the one being checked as a subset. the little guy. the "am I included" one πŸ₯Ί
  • src2 β€” the second cpumask, aka the one being checked as a superset. the big container energy one πŸ‘‘

⭐ RETURN ⭐

  • true β€” all of the bits of src1 are set in src2. slay!! πŸ’–
  • false β€” at least one bit in src1 is not set in src2. not all of them made it in, bestie 😭

🌈 DESCRIPTION 🌈

struct bpf_cpumask pointers may be safely passed to src1 and src2.

that's the whole description, and honestly? it's the important part. if you were worried about whether you can just hand it your struct bpf_cpumask pointers β€” yes. safely. go off πŸ”₯

ngl this one's short on purpose, so don't go looking for hidden lore. two masks in, one bool out, no drama.

πŸ‘‘ SEE ALSO πŸ‘‘

all the siblings in the cpumask cinematic universe 🎬 the kernel file is ./kernel/bpf/cpumask.c, and then we got:


and that's the whole page, bestie!! 🧚 go check your subsets, stay hydrated, and remember: src1 is the subset, src2 is the superset β€” don't mix them up or it's giving chaos πŸ’€

mwah πŸ’œ this lil page lives in ./kernel/bpf, stamped October 2026, and it'll wave at you as bpf_cpumask_subset(9) forever πŸŽ€

πŸ“¦ where this page comes from