netfilter: nft_set_pipapo: merge pipapo_get/lookup
authorFlorian Westphal <fw@strlen.de>
Wed, 9 Jul 2025 17:05:15 +0000 (19:05 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 25 Jul 2025 16:40:30 +0000 (18:40 +0200)
commitd8d871a35ca9ee4881d34995444ed1cb826d01db
treed5eb042964c82c57a7d0d8fd4f0c62d12c62e2bc
parent531e61312104d991459af73c838396db26aa3550
netfilter: nft_set_pipapo: merge pipapo_get/lookup

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>
net/netfilter/nft_set_pipapo.c