Eric Dumazet wrote:
On 64bit arches, we can speedup some IPV6 addresses compares, using 64 bits 
fields in struct in6_addr.

diff --git a/include/linux/in6.h b/include/linux/in6.h
index 2a61c82..a4241a6 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -34,10 +34,12 @@ struct in6_addr
                __u8            u6_addr8[16];
                __be16          u6_addr16[8];
                __be32          u6_addr32[4];
+               __be64          u6_addr64[2];
        } in6_u;
 #define s6_addr                        in6_u.u6_addr8
 #define s6_addr16              in6_u.u6_addr16
 #define s6_addr32              in6_u.u6_addr32
+#define s6_addr64              in6_u.u6_addr64
 };

I also had this idea back in 2004:

>> 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

The problem is that drivers don't necessarily align the address on the correct boundary, so on some 64-bit arches this could be fatal. There's ways around it since I did it in a previous life, but you'd need to copy the addresses and hide them in the skb in the rare case, neither of which is a great thing to do.

Unless Yoshifuji has a better solution...

-Brian
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to