[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52AF13F4.5040409@gmail.com>
Date: Mon, 16 Dec 2013 22:53:40 +0800
From: Ding Tianhong <dthxman@...il.com>
To: Joe Perches <joe@...ches.com>,
Ding Tianhong <dingtianhong@...wei.com>
CC: "David S. Miller" <davem@...emloft.net>,
Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 0/6] slight optimization of addr compare for
some modules
δΊ 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 majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
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