[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1387205111.18217.7.camel@joe-AO722>
Date: Mon, 16 Dec 2013 06:45:11 -0800
From: Joe Perches <joe@...ches.com>
To: 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
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.
--
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