netdev
[Top] [All Lists]

Re: [BK PATCH] Misc IPv6 Updates

To: Brian.Haley@xxxxxx
Subject: Re: [BK PATCH] Misc IPv6 Updates
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Date: Wed, 10 Nov 2004 16:23:16 -0500 (EST)
Cc: kumarkr@xxxxxxxxxx, davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <419285B8.4070703@xxxxxx>
Organization: USAGI Project
References: <OF8CA84FB0.6990A5CD-ON88256F48.0063D0E6-88256F48.0064C53C@xxxxxxxxxx> <419285B8.4070703@xxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
In article <419285B8.4070703@xxxxxx> (at Wed, 10 Nov 2004 16:18:48 -0500), 
Brian Haley <Brian.Haley@xxxxxx> says:

> > Is it faster to do :
> > 
> > +static inline int ipv6_addr_equal(const struct in6_addr *a1,
> > +   const struct in6_addr *a2)
> > +{
> > + return (a1->s6_addr32[3] == a2->s6_addr32[3] &&
> > + a1->s6_addr32[2] == a2->s6_addr32[2] &&
> > + a1->s6_addr32[1] == a2->s6_addr32[1] &&
> > + a1->s6_addr32[0] == a2->s6_addr32[0]);
> > +}
> > +
> > 
> > instead ?It should be faster for typical addresses, say 2000:a:b:c::1 
> > and 2000:a:b:c::2. The device EUI-64 is
> > normally going to be different for all devices while prefix can be same 
> > (atleast on a link/local site) completely
> > or to some prefix len portion.
:
> I will eventually do a 64-bit comparison to see if putting an
> #ifdef CONFIG_64BIT is worth it.

No, because we cannot assume 64bit alignment.

--yoshfuji

<Prev in Thread] Current Thread [Next in Thread>