[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130831.182750.678717944135962097.davem@davemloft.net>
Date: Sat, 31 Aug 2013 18:27:50 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: joe@...ches.com
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] etherdevice: Optimize
compare_ether_addr/ether_addr_equal
From: Joe Perches <joe@...ches.com>
Date: Sat, 31 Aug 2013 01:54:16 -0700
> When CONFIG_HAS_EFFICIENT_UNALIGNED_ACCESS is set,
> optimize compare_ether_addr a little by removing an
> xor and or by using a u32 and u16 comparison
> instead of 3 separate u16 comparisons.
>
> Make the ether_addr_equal_64bits code a bit simpler
> by adding a test for CONFIG_64BIT and calling
> ether_addr_equal otherwise.
>
> This also slightly improves ether_addr_equal_64bits
> by removing the zap_last_2bytes shifts in the !64bit
> case.
>
> Signed-off-by: Joe Perches <joe@...ches.com>
You'll need to update Documantion/unaligned-memory-access.txt as well
because it uses this funcation as a "real life" example.
--
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