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:	Thu, 05 Dec 2013 22:26:28 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] gro: small napi_get_frags() optim

On Thu, 2013-12-05 at 22:11 -0800, Joe Perches wrote:

> Thanks, I agree this patch is appropriate as skb is unlikely
> to be NULL in normal cases.

We do not care if skb is NULL or not.

> 
> But just for thought: isn't the test expense essentially
> free when skb is in a register vs the member set cost?
> 

Test is not 'free', even if predicted.

Study the generated assembly code if you are interested, you'll see this
makes a difference.

> Also, netdev_alloc_skb_ip_align is static inline and it has
> a test of
> 	if (NET_IP_ALIGN && skb)
> just before the return so this "if (skb)" test could already
> be elided by a good compiler but this change requires an
> unconditional set.

NET_IP_ALIGN is 0 on x86, even a 'bad' compiler zaps the whole thing.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ