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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140304.162436.1110716815887069100.davem@davemloft.net>
Date:	Tue, 04 Mar 2014 16:24:36 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	dingtianhong@...wei.com
Cc:	kaber@...sh.net, joe@...ches.com, julia.lawall@...6.fr,
	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] vlan: slight optimization for vlan

From: Ding Tianhong <dingtianhong@...wei.com>
Date: Tue, 4 Mar 2014 18:47:30 +0800

> Ether_addr_equal_64bits is more efficient than ether_addr_equal, and
> can be used when each argument is an array within a structure that
> contains at least two bytes of data beyond the array, so it is safe
> to use it for vlan.
> 
> On a simple test by iperf, it reduces the CPU %system time from 14% to 12%.
> 
> According Joe's suggestion, maybe it'd be faster to add an unlikely to
> the test for PCKET_OTHERHOST, so I add it and see whether the performance
> could be better, but the differences is so small and negligible, maybe my
> test case is not effective enough, but I still add the unlikely and wait to
> hear more opinions.:)
> 
> Cc: Joe Perches <joe@...ches.com>
> Cc: Patrick McHardy <kaber@...sh.net>
> Cc: David S. Miller <davem@...emloft.net>
> Signed-off-by: Ding Tianhong <dingtianhong@...wei.com>

I agree with Joe that we should only use the optimized routine in
performance critical paths.
--
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