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] [day] [month] [year] [list]
Message-ID: <5316BFFB.9090502@huawei.com>
Date:	Wed, 5 Mar 2014 14:11:07 +0800
From:	Ding Tianhong <dingtianhong@...wei.com>
To:	Joe Perches <joe@...ches.com>
CC:	Patrick McHardy <kaber@...sh.net>,
	"David S. Miller" <davem@...emloft.net>,
	Julia Lawall <julia.lawall@...6.fr>,
	Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] vlan: slight optimization for vlan

On 2014/3/5 9:13, Ding Tianhong wrote:
> On 2014/3/4 23:50, Joe Perches wrote:
>> On Tue, 2014-03-04 at 18:47 +0800, Ding Tianhong wrote:
>>> 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.
>>
>> Perhaps I wasn't clear or perhaps you simply disagree,
>> (which is certainly your right), but I think that
>> ether_addr_equal_64bits should _only_ be used in
>> performance sensitive paths because using it requires
>> a person/script to analyze surrounding structures to
>> ensure 2 bytes exist after the address.
>>
>> I don't think that vlan_dev_(open|stop|set_mac_address)
>> are performance sensitive paths.
>>
>> vlan_do_receive, absolutely yes.
>>
>> Is the vlan_device_event:NETDEV_CHANGEADDR:vlan_sync_address
>> path that frequent?  Maybe.
>>
>>> On a simple test by iperf, it reduces the CPU %system time from 14% to 12%.
>>
> 
> Totally agree with you, use the XXX_64bits in slow path make no sense, thanks a lot.
> 
> 
> 
>>> 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.:)
>>
>> A separate patch for the unlikely would likely be better,
>> but I wonder what your test case is.
>>
Hi Joe:

My test case is very simple, use iperf to test the vlan dev, and compare the %system time that
add unlikely or not, do you have any suggestion for that, or gave me some advise, thanks a  lot.

Regards
Ding

>> I presume a single stream of identical vlan PACKET_OTHERHOST
>> packets is atypical.
>>
> 
> OK
> 
> Regards
> Ding
>>
>>
>>
> 


--
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