[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <p731wjt9r9k.fsf@bingen.suse.de>
Date: 13 Mar 2007 15:01:27 +0100
From: Andi Kleen <andi@...stfloor.org>
To: David Miller <davem@...emloft.net>
Cc: rick.jones2@...com, shemminger@...ux-foundation.org,
netdev@...r.kernel.org
Subject: Re: bridge: faster compare for link local addresses
David Miller <davem@...emloft.net> writes:
> From: Rick Jones <rick.jones2@...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
-
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