pipapo_estimate_size(9)
okay bestie, welcome to pipapo_estimate_size(9) from the Kernel API Manual β the page that estimates the worst-case size of a pipapo set. Buckle up, it's math but make it cute. π§π
πΈ NAME πΈ
pipapo_estimate_size β estimate worst-case for set size. No cap, this one is literally about sizing the set before it gets spicy. π«Ά
β¨ SYNOPSIS β¨
u64 pipapo_estimate_size (const struct nft_set_desc *desc );
π ARGUMENTS π
descβ the set description, bestie: the thing holding the element count and field description used here. It's giving "all the deets needed for the estimate". π
π¦ DESCRIPTION π¦
okay so the size for this set type can vary dramatically, because it depends on the number of rules (composing netmasks) that the entries expand to. We compute the worst case here, periodt. π₯
In general, for a non-ranged entry or a single composing netmask, we need one bit in each of the sixteen NFT_PIPAPO_BUCKETS, for each 4-bit group β that's the part where each input bit needs four bits of matching data, iykyk. Plus, we need a bucket in the mapping table for each field. Slay. π
β RETURN β
worst-case set size in bytes, 0 on any overflow. So if it overflows, you get a zero, not a whole dramatic crash era. π
π SEE ALSO π
- Kernel file
./net/netfilter/nft_set_pipapo.h union nft_pipapo_map_bucket(9)struct nft_pipapo_field(9)struct nft_pipapo_scratch(9)struct nft_pipapo_match(9)struct nft_pipapo(9)struct nft_pipapo_elem(9)pipapo_and_field_buckets_4bit(9)pipapo_and_field_buckets_8bit(9)pipapo_resmap_init(9)
that's the whole page, bestie. source/version: ./net/netfilter Β· date: October 2026 Β· mwah ππ
π¦ 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