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: <CANn89iL4a-r1LuPGu19rBgwbV3-8Wco5UdYN-tgoNKoKZ9mUJg@mail.gmail.com>
Date:   Thu, 28 Jul 2022 18:01:26 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     Richard Gobert <richardbgobert@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>, Dmitry Kozlov <xeb@...l.ru>,
        iwienand@...hat.com, Arnd Bergmann <arnd@...db.de>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: gro: skb_gro_header_try_fast helper function

On Thu, Jul 28, 2022 at 1:40 PM Richard Gobert <richardbgobert@...il.com> wrote:
>
> Introduce a simple helper function to replace a common pattern.
> When accessing the GRO header, we fetch the pointer from frag0,
> then test its validity and fetch it from the skb when necessary.
>
> This leads to the pattern
> skb_gro_header_fast -> skb_gro_header_hard -> skb_gro_header_slow
> recurring many times throughout the GRO code.
>
> This patch replaces these patterns with a single inlined function
> call, improving code readability.
>
> Signed-off-by: Richard Gobert <richardbgobert@...il.com>
> ---
>  include/net/gro.h      | 33 ++++++++++++++++++---------------
>  net/ethernet/eth.c     |  9 +++------
>  net/ipv4/af_inet.c     |  9 +++------
>  net/ipv4/gre_offload.c |  9 +++------
>  net/ipv4/tcp_offload.c |  9 +++------

It seems there are other places this helper could be used ?

drivers/net/geneve.c
drivers/net/vxlan/vxlan_core.c
net/8021q/vlan_core.c
net/ipv4/fou.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ