nft_pipapo_avx2_refill(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nft_pipapo_avx2_refill(9) β€” like, the Kernel API Manual, bestie ✨

okay so picture this: you're deep in the nft_pipapo_avx2 corner of the kernel β€” yes, that's the manual name, we're in Kernel API Manual territory β€” and you need a bitmap refilled. This function is literally the AVX2-flavored twin of pipapo_refill, and she's here to help. πŸ¦‹


✨ NAME ✨

nft_pipapo_avx2_refill β€” scan a bitmap, pick the mapping table item, set the bits. That's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

int nft_pipapo_avx2_refill (int offset , unsigned long *map , unsigned long *dst , union nft_pipapo_map_bucket *mt , bool last );

πŸŽ€ ARGUMENTS πŸŽ€

  • offset β€” start scanning from this bitmap (which is basically a bucket) offset, measured in longs. like, longs the integer type, not "long" the adjective 😭
  • map β€” the bitmap that gets scanned for set bits. this is the main character here fr.
  • dst β€” the destination bitmap. where the bits end up living πŸ’–
  • mt β€” the mapping table, holding all the bit set specifiers.
  • last β€” if this is the last field, return the index of the first set bit instead. lowkey changes the whole return value, so pay attention πŸ‘€

πŸ”₯ DESCRIPTION πŸ”₯

So this is an alternative implementation of pipapo_refill, and she's specifically built to be used with the AVX2 lookup routines. The tea: we know there are four words to be scanned, at a given offset inside the map, for each matching iteration. That's the deal. ✨

⚠️ The caller must ensure at least one bit in those four words is set. That's on you, bestie, not on her.

And the plot twist you know is coming: this function doesn't actually use any AVX2 instruction. πŸ’€ iconic behavior honestly, she's in the AVX2 club but she's not using any AVX2 instructions. we love a queen who just shows up.


🌈 RETURN 🌈

  • the first set bit index if last is set ✨
  • otherwise, the index of the first filled word 🫢

🧚 SEE ALSO 🧚

Kernel file ./net/netfilter/nft_set_pipapo_avx2.c β€” go read the source, iykyk πŸ“–

the whole friend group, assembled. πŸ‘‘


okay that's the whole page bestie, no cap. this came to you from ./net/netfilter, dated October 2026, and it's the nft_pipapo_avx2_refill(9) era β€” go forth and refill those bitmaps, you're gonna slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from