pipapo_refill(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so this is pipapo_refill(9), straight out of the Kernel API Manual, and bestie, it's a whole little bitmap-refill situation. ✨

pipapo_refill β€” for each set bit, set bits from the selected mapping table item. Yes, that's the summary, and yes, it's doing exactly what it says. πŸ’…


✨ SYNOPSIS ✨

here's the signature, character-for-character, because we do not mess with literal C, periodt:

int pipapo_refill (unsigned long *map , unsigned int len , unsigned int rules , unsigned long *dst , const union nft_pipapo_map_bucket *mt , bool match_only );

πŸŽ€ ARGUMENTS πŸŽ€

six args, no skips, let's go 🫢

  • map β€” the bitmap that gets scanned for set bits.
  • len β€” length of the bitmap in longs.
  • rules β€” number of rules in the field.
  • dst β€” the destination bitmap.
  • mt β€” mapping table containing the bit set specifiers.
  • match_only β€” find a single bit and return; don't fill.

πŸ¦‹ DESCRIPTION πŸ¦‹

first, credit where it's due: the iteration over set bits with __builtin_ctzl comes from Daniel Lemire, public domain. 🫢

then the actual bit magic: for each bit set in map, it selects the bucket from the mapping table with the index corresponding to the position of that set bit. then it uses the start bit and the amount of bits specified in that bucket to fill the region in dst. πŸ¦‹


🌸 RETURN 🌸

the return situation is simple:

  • -1 on no match.
  • the bit position on match_only.
  • 0 otherwise.

that's the whole menu β€” no secret extra returns, no mystery bonus value. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

you want the extended universe? say less. here's the whole reading list, exactly in order:


mwah πŸ’‹ β€” that's the whole page, bestie. source/version is ./net/netfilter, date is October 2026, and the page is pipapo_refill(9). πŸŽ€βœ¨

πŸ“¦ where this page comes from