ethnl_bitset32_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ethnl_bitset32_size(9) β€” like, the bitset sizer, bestie

okay so this is a page from the Kernel API Manual, and it's about ethnl_bitset32_size β€” yes it's a mouthful, no we're not renaming it, it's iconic actually πŸŽ€


✨ NAME ✨

ethnl_bitset32_size β€” literally calculates the size of a bitset nested attribute. that's the whole job. she's a size calculator and she slays at it πŸ’…


🌸 SYNOPSIS 🌸

int ethnl_bitset32_size (const u32 *val , const u32 *mask , unsigned int
       nbits , ethnl_string_array_t names , bool compact );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • val β€” the value bitmap, and it's u32 based bestie. the actual bits, the moment, the main character πŸ’–
  • mask β€” the mask bitmap, also u32 based β€” and this one's optional, so she can ghost if she wants 🫢
  • nbits β€” the bit length of the bitset. like how many bits we're working with, no cap πŸ“
  • names β€” array of bit names, and yeah this is optional too (type is ethnl_string_array_t if you're keeping track) ✨
  • compact β€” assume compact format for output. you're telling her "yes queen, keep it tight" πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so the vibe is: this function estimates the length of a netlink attribute that a later call to ethnl_put_bitset32 is gonna build with the same arguments.

it's the preview. the teaser. the "how much room do i need to reserve" moment. it does not build the attribute, it just tells you how big it'll be πŸŽ€ lowkey a little psychic of her 🌈


⭐ RETURN ⭐

she returns either a negative error code (boo, something went wrong 😭) or the attribute length estimate (yay, we have a number πŸŽ‰). that's it. that's the return. periodt.


πŸ‘‘ SEE ALSO πŸ‘‘

the Kernel file is ./net/ethtool/bitset.c β€” go read it, it's giving family reunion 🧚

all her besties fr fr πŸ’œ


okay that's the page!! shoutout to the Kernel API Manual for having her, and this one's sourced from ./net/ethtool, dated October 2026 β€” it's giving future icon πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from