From: Stefano Brivio <sbrivio@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nf-next] netfilter: nft_set_pipapo: increment data in one step
Date: Sat, 21 Mar 2026 15:25:15 +0100 (CET) [thread overview]
Message-ID: <20260321152515.5bc0f77f@elisabeth> (raw)
In-Reply-To: <20260318133840.1334-1-fw@strlen.de>
On Wed, 18 Mar 2026 14:38:34 +0100
Florian Westphal <fw@strlen.de> wrote:
> For unkown reason the C version increments the data pointer in two steps.
That's because before commit e807b13cb3e3 ("nft_set_pipapo: Generalise
group size for buckets") pipapo_get() contained the whole lookup
implementation with __bitmap_and(), and 'data' was used as pointer to
move between bit groups, and incremented as we went through them.
With that commit, we don't need to keep 'data' updated during the
lookup anymore, so I just replaced the initial increment, but I didn't
notice that 'data' isn't used at all before the second increment now,
and that the two increments could be merged.
> Switch to a single invocation of NFT_PIPAPO_GROUPS_PADDED_SIZE() helper,
> like the avx2 implementation.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
--
Stefano
prev parent reply other threads:[~2026-03-21 14:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 13:38 [PATCH nf-next] netfilter: nft_set_pipapo: increment data in one step Florian Westphal
2026-03-21 14:25 ` Stefano Brivio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260321152515.5bc0f77f@elisabeth \
--to=sbrivio@redhat.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox