From: Daniel Borkmann <daniel@iogearbox.net>
To: Eric Dumazet <edumazet@google.com>, Alexei Starovoitov <ast@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
Vlad Dumitrescu <vladum@google.com>
Subject: Re: [PATCH bpf-next v2 1/1] bpf, lpm: make longest_prefix_match() faster
Date: Thu, 22 Nov 2018 11:10:06 +0100 [thread overview]
Message-ID: <e04fcc91-c8cd-ef94-82b2-d9c07cf43519@iogearbox.net> (raw)
In-Reply-To: <20181122053952.18244-1-edumazet@google.com>
On 11/22/2018 06:39 AM, Eric Dumazet wrote:
> At LPC 2018 in Vancouver, Vlad Dumitrescu mentioned that longest_prefix_match()
> has a high cost [1].
>
> One reason for that cost is a loop handling one byte at a time.
>
> We can handle more bytes at a time, if enough attention is paid
> to endianness.
>
> I was able to remove ~55 % of longest_prefix_match() cpu costs.
>
> [1] https://linuxplumbersconf.org/event/2/contributions/88/attachments/76/87/lpc-bpf-2018-shaping.pdf
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Vlad Dumitrescu <vladum@google.com>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Daniel Borkmann <daniel@iogearbox.net>
Looks good, applied to bpf-next, thanks!
prev parent reply other threads:[~2018-11-22 20:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 5:39 [PATCH bpf-next v2 1/1] bpf, lpm: make longest_prefix_match() faster Eric Dumazet
2018-11-22 10:10 ` Daniel Borkmann [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=e04fcc91-c8cd-ef94-82b2-d9c07cf43519@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vladum@google.com \
/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