nft_pipapo_lookup(9)
π nft_pipapo_lookup(9) π
Okay bestie, welcome to the Kernel API Manual page for nft_pipapo_lookup(9) β this is literally the dataplane front door for the main lookup function, and it's giving main character energy. Let's get into it. π«Ά
π SYNOPSIS π
const struct nft_set_ext * nft_pipapo_lookup (const struct net *net ,
const struct nft_set *set , const u32 *key );
π ARGUMENTS π
netβ the network namespace, obvi.setβ the nftables API set representation, your main character set.keyβ a pointer to the nft registers holding the key data you're hunting for.
πΈ DESCRIPTION πΈ
So like, this function gets called straight from the data path, no cap. It's gonna search for an element that matches the key you give it, but only in the current active copy. And here's the tea: unlike other set types, this uses 0 instead of nft_genmask_cur. Iconic behavior, honestly.
Why? Because new (future) elements aren't reachable from priv->match β they get added to priv->clone instead. When the commit phase flips the generation bitmask, those elements become visible. Using nft_genmask_cur thus creates inconsistent state: matching old entries get skipped, but the newly matching entries are unreachable. It's giving broken vibes. π
GENMASK_ANY doesn't work for the same reason: old-gen entries get skipped, new-gen entries are only reachable from priv->clone. Then nft_pipapo_commit swaps ->clone and ->match shortly after the genbit flip. Since ->clone doesn't contain the old entries in the first place, the lookup will only find the now-current ones. Slay. π
π RETURN π
It returns the ntables API extension pointer, or NULL if there's no match β literally no match, no vibes. π«Ά
π SEE ALSO π
Bestie, if you wanna go deeper, here's the whole friend group:
- Kernel file
./net/netfilter/nft_set_pipapo.cTheory of Operation(9) β the whole theory of operation, if you're feeling academic. π pipapo_refill(9)pipapo_get_slow(9)pipapo_get(9)nft_pipapo_get(9)pipapo_realloc_mt(9)lt_calculate_size(9)pipapo_resize(9)pipapo_bucket_set(9)pipapo_lt_4b_to_8b(9)pipapo_lt_8b_to_4b(9)pipapo_lt_bits_adjust(9)pipapo_insert(9)pipapo_step_diff(9)pipapo_step_after_end(9)pipapo_base_sum(9)pipapo_expand(9)pipapo_map(9)pipapo_free_scratch(9)pipapo_realloc_scratch(9)pipapo_maybe_clone(9)nft_pipapo_insert(9)pipapo_clone(9)pipapo_rules_same_key(9)pipapo_unmap(9)pipapo_drop(9)pipapo_gc_scan(9)pipapo_gc_queue(9)pipapo_free_fields(9)pipapo_reclaim_match(9)nft_pipapo_commit(9)nft_pipapo_activate(9)nft_pipapo_deactivate(9)nft_pipapo_flush(9)pipapo_get_boundaries(9)pipapo_match_field(9)nft_pipapo_remove(9)nft_pipapo_do_walk(9)nft_pipapo_walk(9)nft_pipapo_privsize(9)nft_pipapo_estimate(9)nft_pipapo_init(9)nft_set_pipapo_match_destroy(9)nft_pipapo_destroy(9)nft_pipapo_gc_init(9)
This page is from ./net/netfilter, dated October 2026, and it's all about nft_pipapo_lookup(9). Bye bestie! πβ¨
π¦ 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