diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2021-03-10 01:06:34 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-03-10 01:07:21 +0100 |
commit | 32f91529e2bdbe0d92edb3ced41dfba4beffa84a (patch) | |
tree | 2e6ca2aa0d6d1ac694002dd4aff11915473d4118 /init | |
parent | 11d39cfeecfc9d92a5faa2a55c228e796478e0cb (diff) | |
parent | ee75aef23afe6e88497151c127c13ed69f41aaa2 (diff) |
Merge branch 'bpf-xdp-redirect'
Björn Töpel says:
====================
This two patch series contain two optimizations for the
bpf_redirect_map() helper and the xdp_do_redirect() function.
The bpf_redirect_map() optimization is about avoiding the map lookup
dispatching. Instead of having a switch-statement and selecting the
correct lookup function, we let bpf_redirect_map() be a map operation,
where each map has its own bpf_redirect_map() implementation. This way
the run-time lookup is avoided.
The xdp_do_redirect() patch restructures the code, so that the map
pointer indirection can be avoided.
Performance-wise I got 4% improvement for XSKMAP
(sample:xdpsock/rx-drop), and 8% (sample:xdp_redirect_map) on my
machine.
v5->v6: Removed REDIR enum, and instead use map_id and map_type. (Daniel)
Applied Daniel's fixups on patch 1. (Daniel)
v4->v5: Renamed map operation to map_redirect. (Daniel)
v3->v4: Made bpf_redirect_map() a map operation. (Daniel)
v2->v3: Fix build when CONFIG_NET is not set. (lkp)
v1->v2: Removed warning when CONFIG_BPF_SYSCALL was not set. (lkp)
Cleaned up case-clause in xdp_do_generic_redirect_map(). (Toke)
Re-added comment. (Toke)
rfc->v1: Use map_id, and remove bpf_clear_redirect_map(). (Toke)
Get rid of the macro and use __always_inline. (Jesper)
====================
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions