]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nft_set_pipapo: merge pipapo_get/lookup
authorFlorian Westphal <fw@strlen.de>
Wed, 9 Jul 2025 17:05:15 +0000 (19:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:37:37 +0000 (16:37 +0200)
commit610c1e196fc86664869c3265818ece602d2adc58
tree18cb15bc38cfe879058f237b0a093d23b97d8147
parent06f714dbe6f35f7d345bdc1148131f92ed1e6a36
netfilter: nft_set_pipapo: merge pipapo_get/lookup

[ Upstream commit d8d871a35ca9ee4881d34995444ed1cb826d01db ]

The matching algorithm has implemented thrice:
1. data path lookup, generic version
2. data path lookup, avx2 version
3. control plane lookup

Merge 1 and 3 by refactoring pipapo_get as a common helper, then make
nft_pipapo_lookup and nft_pipapo_get both call the common helper.

Aside from the code savings this has the benefit that we no longer allocate
temporary scratch maps for each control plane get and insertion operation.

Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Stable-dep-of: c4eaca2e1052 ("netfilter: nft_set_pipapo: don't check genbit from packetpath lookups")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_set_pipapo.c