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]
Date:   Wed, 11 Nov 2020 08:26:58 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Alexander Lobakin <alobakin@...me>
Cc:     Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 net] net: udp: fix Fast/frag0 UDP GRO

On Wed, 11 Nov 2020 11:29:06 +0000 Alexander Lobakin wrote:
> >>> +     sk = static_branch_unlikely(&udp_encap_needed_key) ?
> >>> +          udp4_gro_lookup_skb(skb, uh->source, uh->dest) :
> >>> +          NULL;  
> >
> > Does this indentation pass checkpatch?  
> 
> Sure, I always check my changes with checkpatch --strict.
> 
> > Else, the line limit is no longer strict,a and this only shortens the
> > line, so a single line is fine.  
> 
> These single lines is about 120 chars, don't find them eye-pleasant.
> But, as with "u32" above, they're pure cosmetics and can be changed.

let me chime in on the perhaps least important aspect of the patch :)

Is there are reason to use a ternary operator here at all?
Isn't this cleaner when written with an if statement?

	sk = NULL;
	if (static_branch_unlikely(&udp_encap_needed_key))
		sk = udp4_gro_lookup_skb(skb, uh->source, uh->dest);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ