pipapo_unmap(9)
π NAME π
pipapo_unmap β bestie, this one removes rules from mapping tables and renumbers the ones that are left, no cap
So like, we're in the pipapo_unmap(9) corner of the Kernel API Manual, and this is the function that ghosted your rules for you (affectionately). π«Ά
β¨ SYNOPSIS β¨
void pipapo_unmap (union nft_pipapo_map_bucket *mt , unsigned int rules
, unsigned int start , unsigned int n , unsigned int to_offset , bool
is_last );
π ARGUMENTS π
Okay so here's the whole cast, and every single one of them matters, don't skip:
mtβ the mapping array. literally the main character here πrulesβ the original amount of rules in the mapping table (the "before" number, iykyk)startβ first rule index to be removednβ amount of rules to be removedto_offsetβ first rule index, in next field, this group of rules maps tois_lastβ if this is the last field, delete reference from mapping array
π¦ DESCRIPTION π¦
So this is used to unmap rules from the mapping table for a single field, and the whole point is maintaining consistency and compactness for the existing ones. Like, the survivors get tidied up and renumbered so nothing looks sus afterwards. β¨
Let's do this in pictures, because reading is hard and diagrams ate:
Say we wanna delete rules 2 and 3 from this mapping array:
rules 0 1 2 3 4 map to: 4-10 4-10 11-15 11-15 16-18
The result will be:
rules 0 1 2 map to: 4-10 4-10 11-13
β¦and that's for fields before the last one. π§
Now, in case this is the mapping table for the last field in a set, and rules map to pointers to struct nft_pipapo_elem:
rules 0 1 2 3 4 element pointers: 0x42 0x42 0x33 0x33 0x44
The result will be:
rules 0 1 2 element pointers: 0x42 0x42 0x44
See how the 0x33s justβ¦ left the chat? π And 0x44 slid into slot 2 like it always belonged there. Periodt.
π SEE ALSO π
The whole group chat, fr fr β go read all of them:
- Kernel file
./net/netfilter/nft_set_pipapo.cTheory of Operation(9) pipapo_refill(9)pipapo_get_slow(9)pipapo_get(9)nft_pipapo_lookup(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_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)
lowkey the whole pipapo extended universe is in there, bestie. click through, it's giving syllabus. π
okay that's the whole page, mwah π this iconic little number lives in ./net/netfilter, dated October 2026, and it's filed under pipapo_unmap(9) β go off, you're gonna slay this mapping table ππΈ
π¦ 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