nft_pipapo_avx2_lookup_8b_4(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nft_pipapo_avx2_lookup_8b_4(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, buckle up, because we're about to read a kernel function signature like it's the group chat 😌 this one lives in the Kernel API Manual and it's genuinely iconic if you're into netfilter stuff πŸ¦‹

✨ NAME ✨

nft_pipapo_avx2_lookup_8b_4 β€” the AVX2-based lookup for 4 eight-bit groups, no cap πŸ’…

🌸 SYNOPSIS 🌸

int nft_pipapo_avx2_lookup_8b_4 (unsigned long *map , unsigned long
*fill , const struct nft_pipapo_field *f , int offset , const u8 *pkt ,
bool first , bool last );

like, that's the whole vibe right there: it returns an int, and it takes all those params, periodt πŸŽ€

πŸŽ€ ARGUMENTS πŸŽ€

  • map β€” previous match result, used as the initial bitmap 🫢 like it already did the work and now we're building on it
  • fill β€” the destination bitmap that gets filled with the current match result πŸ’– this is where the tea gets poured
  • f β€” the field, containing the lookup and mapping tables πŸ‘‘ the main character struct fr
  • offset β€” ignore buckets before the given index, and ngl no bits are filled there πŸ™ˆ
  • pkt β€” the packet data, aka a pointer to the input nftables register πŸ“
  • first β€” if this is the first field, don't source the previous result πŸ’€ literally a fresh start
  • last β€” last field energy: stop at the first match and return the bit index ⭐

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, just go see nft_pipapo_avx2_lookup_4b_2 for the full lore, iykyk πŸ“–

this one is used for 32-bit fields (i.e. IPv4 addresses) 🌈 lowkey iconic of it

πŸ”₯ RETURN πŸ”₯

  • -1 on no match 😭
  • the rule index of the match, if last πŸ’–
  • otherwise, the first long word index to be checked next (i.e. the first filled word) ✨
like bestie, read those three carefully, because the return value literally changes shape depending on last β€” that's not me being dramatic, that's just the contract πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./net/netfilter/nft_set_pipapo_avx2.c β€” the source of truth 🧚

and the whole friend group:


okay that's the whole page, and fr fr you ate it 🫢 this one's brought to you by ./net/netfilter, October 2026, and nft_pipapo_avx2_lookup_8b_4(9) β€” slay, go read the source, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from