Subject: Re: [PATCH net-next v2 0/6] slight optimization of addr compare for some modules

From: Ding Tianhong <[email-masked]>
Date: Mon, 16 Dec 2013 22:53:40 +0800

于 2013/12/16 22:45, Joe Perches 写道:
> On Mon, 2013-12-16 at 16:24 +0800, Ding Tianhong wrote:
>> Joe Perches add ether_addr_equal_unaligned to test if
>> possibly unaligned to u16 Ethernet addresses are equal.
>>
>> If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set, this uses
>> the slightly faster generic routine ether_addr_equal,
>> otherwise this uses memcmp.
>>
>> So I replace memcmp with ether_addr_equal_unaligned in some place
>> for slight optimization.
> 
> Hi.
> 
> These seem like sensible cleanups, thanks, but
> my name doesn't need to go into the commit log
> multiple times like this.
> 
> I suggest something like:
> 
> Use the recently added and possibly more efficient
> ether_addr_equal_unaligned.
> 
> Are you intending to do more of these?
> 
> $ git grep -E "\bmemcmp\s*\([^,]*,[^,]*,\s*(ETH_ALEN|6)\s*\)" * | wc -l
> 299
> 
> Perhaps the majority of these should use ether_addr_equal
> or ether_addr_equal_unaligned.
> 
> 

yes, it is a juge work to review the whole places and I think it should be
finished by several times, maybe start from this patchset.

I will modify the changelog and simplify it. Thanks.

Regards
Ding

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