pipapo_unmap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 removed
  • n β€” amount of rules to be removed
  • to_offset β€” first rule index, in next field, this group of rules maps to
  • is_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:


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