aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-11-21 21:39:52 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2018-11-22 10:35:13 +0100
commit8d75839b843ae0ef8d9db97ed05b493e687e6b75 (patch)
treea105ed36362e91dede6e6d145e215c9fb9ea4007 /tools/bpf
parentMerge branch 'bpf-libbpf-mapinmap' (diff)
downloadlinux-dev-8d75839b843ae0ef8d9db97ed05b493e687e6b75.tar.xz
linux-dev-8d75839b843ae0ef8d9db97ed05b493e687e6b75.zip
bpf, lpm: make longest_prefix_match() faster
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> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions