ethnl_bitset32_size(9)
π 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'su32based bestie. the actual bits, the moment, the main character πmaskβ the mask bitmap, alsou32based β 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 isethnl_string_array_tif 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 π§
ethnl_bitmap32_clear(9)ethnl_bitmap32_not_zero(9)ethnl_bitmap32_update(9)ethnl_put_bitset32(9)ethnl_bitset_is_compact(9)ethnl_name_to_idx(9)ethnl_bitmap32_equal(9)ethnl_update_bitset32(9)ethnl_parse_bitset(9)
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
- 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