nft_pipapo_avx2_lookup_8b_4(9)
π 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 itfillβ the destination bitmap that gets filled with the current match result π this is where the tea gets pouredfβ the field, containing the lookup and mapping tables π the main character struct froffsetβ 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 startlastβ 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 π₯
-1on 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:
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_8(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_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)
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
- 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