All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: David Miller <davem@davemloft.net>
Cc: rick.jones2@hp.com, shemminger@linux-foundation.org,
	netdev@vger.kernel.org
Subject: Re: bridge: faster compare for link local addresses
Date: 13 Mar 2007 15:01:27 +0100	[thread overview]
Message-ID: <p731wjt9r9k.fsf@bingen.suse.de> (raw)
In-Reply-To: <20070312.171029.85409273.davem@davemloft.net>

David Miller <davem@davemloft.net> writes:

> From: Rick Jones <rick.jones2@hp.com>
> Date: Mon, 12 Mar 2007 17:05:39 -0700
> 
> > Being paranoid - are there no worries about the alignment of dest?
> 
> If it's an issue, it's an issue elsewhere too, as the places
> where Stephen took this idiomatic code from is the code
> ethernet handling and that runs on every input packet via
> eth_type_trans().

As a quick note -- when you tell gcc the expected alignment
by using correct types then moderm gcc should generate fast inline code 
for memcpy/memcmp/etc. by itself. It only falls back to a slow generic
function when it cannot figure out the alignment or the size.

So I expect just using u32 * instead of char * should have the same
effect and would be somewhat cleaner and the memcmp could be kept.

-Andi

  reply	other threads:[~2007-03-13 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 23:20 bridge: faster compare for link local addresses Stephen Hemminger
2007-03-12 23:26 ` David Miller
2007-03-13  0:05 ` Rick Jones
2007-03-13  0:10   ` David Miller
2007-03-13 14:01     ` Andi Kleen [this message]
2007-03-13 13:38       ` Eric Dumazet
2007-03-13 19:39         ` David Miller
2007-03-13 20:06           ` Stephen Hemminger

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=p731wjt9r9k.fsf@bingen.suse.de \
    --to=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    --cc=shemminger@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.