Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] etherdevice: Optimize compare_ether_addr/ether_addr_equal
Date: Mon, 02 Sep 2013 09:52:21 -0700	[thread overview]
Message-ID: <1378140741.1953.85.camel@joe-AO722> (raw)
In-Reply-To: <20130831.182750.678717944135962097.davem@davemloft.net>

On Sat, 2013-08-31 at 18:27 -0400, David Miller wrote:
> From: Joe Perches <joe@perches.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@perches.com>
> 
> You'll need to update Documantion/unaligned-memory-access.txt as well
> because it uses this funcation as a "real life" example.

I submitted patches converting compare_ether_addr uses
to ether_addr_equal.

I'll send this patch again along with documenting the
requirement for ether_addr_equal if/after those patches
are applied so compare_ether_addr can be removed.

      reply	other threads:[~2013-09-02 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-31  8:54 [PATCH net-next] etherdevice: Optimize compare_ether_addr/ether_addr_equal Joe Perches
2013-08-31 16:43 ` Stephen Hemminger
2013-08-31 20:58   ` Joe Perches
2013-08-31 19:41 ` Sergei Shtylyov
2013-08-31 22:27 ` David Miller
2013-09-02 16:52   ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1378140741.1953.85.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox