From: Anton Protopopov <aspsk@isovalent.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
John Fastabend <john.fastabend@gmail.com>
Subject: Re: [PATCH v2 bpf-next] bpf: optimize hashmap lookups when key_size is divisible by 4
Date: Sun, 2 Apr 2023 11:45:32 +0000 [thread overview]
Message-ID: <ZClq3Eh3V37eCjDN@zh-lab-node-5> (raw)
In-Reply-To: <CAADnVQJpF+rYo969niqpPPh_=Sv-2jztA0GpRYBfi-jPE65ZyQ@mail.gmail.com>
On Sat, Apr 01, 2023 at 03:10:46PM -0700, Alexei Starovoitov wrote:
> On Sat, Apr 1, 2023 at 1:05 PM Anton Protopopov <aspsk@isovalent.com> wrote:
> >
> > [...]
> >
> > static inline u32 htab_map_hash(const void *key, u32 key_len, u32 hashrnd)
> > {
> > + if (likely(key_len % 4 == 0))
> > + return jhash2(key, key_len / 4, hashrnd);
> > return jhash(key, key_len, hashrnd);
> > }
>
> This looks much cleaner than v1. Applied.
Thanks!
> Do you mind doing similar patch for bloomfilter?
> (removing aligned_u32_count variable)
Sure, done.
next prev parent reply other threads:[~2023-04-02 11:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-01 20:06 [PATCH v2 bpf-next] bpf: optimize hashmap lookups when key_size is divisible by 4 Anton Protopopov
2023-04-01 22:10 ` Alexei Starovoitov
2023-04-02 11:45 ` Anton Protopopov [this message]
2023-04-01 22:20 ` patchwork-bot+netdevbpf
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=ZClq3Eh3V37eCjDN@zh-lab-node-5 \
--to=aspsk@isovalent.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=martin.lau@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.