nft_pipapo_avx2_lookup_4b_8(9)
β¨ nft_pipapo_avx2_lookup_4b_8 β¨
okay bestie so this is a page straight out of the Kernel API Manual (section 9, if you're keeping track) and it's all about nft_pipapo_avx2_lookup_4b_8 β the AVX2-based lookup for 8 four-bit groups π
no cap, that's the whole name in the NAME section and we're keeping it verbatim because it's iconic.
π SYNOPSIS π
int nft_pipapo_avx2_lookup_4b_8 (unsigned long *map , unsigned long
*fill , const struct nft_pipapo_field *f , int offset , const u8 *pkt ,
bool first , bool last );
look at her go π seven args, returns an int, absolutely main character energy.
π ARGUMENTS π
okay so let's meet the cast:
mapβ the previous match result, and it gets used as the initial bitmap. it's giving "we already know some stuff, let's not start from scratch" π«Άfillβ the destination bitmap, aka where the current match result gets written. this one's the empty canvas π¨fβ the field, and it's holding the lookup tables and the mapping tables. busy queen πoffsetβ ignore buckets before this given index, and fr fr no bits get filled there. like, don't even look at them πpktβ the packet data, a pointer to the input nftables register. the actual tea βfirstβ if this is the first field, don't source the previous result. fresh start, no baggage β¨lastβ last field behavior: stop at the very first match and return the bit index. she's efficient π
π¦ DESCRIPTION π¦
okay so the real explanation? see nft_pipapo_avx2_lookup_4b_2 β that's the lore, go read it, iykyk π
and this particular one is used for 32-bit fields, i.e. IPv4 addresses. yes, that's literally what it says, and yes, it's lowkey a slay πΈ
π RETURN π
so what does she give back:
-1on no match π- the rule index of the match, if
lastis set π₯ - otherwise, the first long word index to be checked next (i.e. the first filled word) π
three possible vibes, one int. she's versatile.
ngl, remember that -1 means no match β don't go treating it as a valid index, bestie π
β SEE ALSO β
the whole friend group, and we're listing every single one because nobody gets left out π«Ά
- Kernel file
./net/netfilter/nft_set_pipapo_avx2.c nft_pipapo_avx2_prepare(9)nft_pipapo_avx2_fill(9)nft_pipapo_avx2_refill(9)nft_pipapo_avx2_lookup_4b_2(9)nft_pipapo_avx2_lookup_4b_4(9)nft_pipapo_avx2_lookup_4b_12(9)nft_pipapo_avx2_lookup_4b_32(9)nft_pipapo_avx2_lookup_8b_1(9)nft_pipapo_avx2_lookup_8b_2(9)nft_pipapo_avx2_lookup_8b_4(9)nft_pipapo_avx2_lookup_8b_6(9)nft_pipapo_avx2_lookup_8b_16(9)nft_pipapo_avx2_lookup_slow(9)nft_pipapo_avx2_estimate(9)pipapo_resmap_init_avx2(9)pipapo_get_avx2(9)nft_pipapo_avx2_lookup(9)
and that's the whole page, bestie π§ this one comes to you from ./net/netfilter, dated October 2026, and it's filed under nft_pipapo_avx2_lookup_4b_8(9) β periodt π
π¦ 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