lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8a094161-56fc-e6f6-3108-e5758f3bf977@iogearbox.net>
Date:   Wed, 10 Mar 2021 01:19:19 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Björn Töpel <bjorn.topel@...il.com>,
        ast@...nel.org, netdev@...r.kernel.org, bpf@...r.kernel.org
Cc:     bjorn.topel@...el.com, maciej.fijalkowski@...el.com,
        hawk@...nel.org, toke@...hat.com, magnus.karlsson@...el.com,
        john.fastabend@...il.com, kuba@...nel.org, davem@...emloft.net
Subject: Re: [PATCH bpf-next v6 0/2] Optimize
 bpf_redirect_map()/xdp_do_redirect()

On 3/8/21 12:29 PM, Björn Töpel wrote:
> Hi XDP-folks,
> 
> 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.
> 
> @Jesper/@...e I kept your Acked-by: for patch 2. Let me know, if you
> don't agree with that decision.
> 
> More details in each commit.
> 
> Changelog:
> 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)

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ