OpenVZ Forum


Home » Mailing lists » Devel » [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses
Re: [BRIDGE] Unaligned access on IA64 when comparing ethernet addresses [message #12188 is a reply to message #12186] Thu, 19 April 2007 18:18 Go to previous messageGo to previous message
Stephen Hemminger is currently offline  Stephen Hemminger
Messages: 37
Registered: August 2006
Member
On Thu, 19 Apr 2007 16:14:23 +0200
Eric Dumazet <dada1@cosmosbay.com> wrote:

> On Wed, 18 Apr 2007 13:04:22 -0700 (PDT)
> David Miller <davem@davemloft.net> wrote:
>
> >
> > Although I don't think gcc does anything fancy since we don't
> > use memcmp(). It's a tradeoff, we'd like to use unsigned long
> > comparisons when both objects are aligned correctly but we also
> > don't want it to use any more than one potentially mispredicted
> > branch.
>
> Again, memcmp() *cannot* be optimized, because its semantic is to compare bytes.
>
> memcpy() can take into account alignement if known at compile time, not memcmp()
>
> http://lists.openwall.net/netdev/2007/03/13/31

It can if we order bytes in the bridge id properly. See ktime_t for example.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Getting the new RxRPC patches upstream
Next Topic: [PATCH] Show slab memory usage on OOM and SysRq-M (v3)
Goto Forum:
  


Current Time: Sun Aug 03 06:57:29 GMT 2025

Total time taken to generate the page: 0.50666 seconds