Hi, would using this ever help anything? On i386 the results are practically identical (old version doing mov, cmp, mov, cmp vs. new one doing 4 movs and 2 xors + or + test, perform about the same), but on amd64 the cmpq version is about 20% faster. I don't know about any other architectures.
If there are some ok's, I could start rewriting stuff in the forwarding path (like pf_addr_compare). If there is a reason to keep them all 32bit, it might as well get documented :-) -- Martin Pelikan Index: in6.h =================================================================== RCS file: /cvs/src/sys/netinet6/in6.h,v retrieving revision 1.53 diff -u -p -r1.53 in6.h --- in6.h 2 May 2011 13:48:38 -0000 1.53 +++ in6.h 9 Oct 2011 23:18:16 -0000 @@ -118,6 +118,7 @@ struct in6_addr { u_int8_t __u6_addr8[16]; u_int16_t __u6_addr16[8]; u_int32_t __u6_addr32[4]; + u_int64_t __u6_addr64[2]; } __u6_addr; /* 128-bit IP6 address */ }; @@ -126,6 +127,7 @@ struct in6_addr { #define s6_addr8 __u6_addr.__u6_addr8 #define s6_addr16 __u6_addr.__u6_addr16 #define s6_addr32 __u6_addr.__u6_addr32 +#define s6_addr64 __u6_addr.__u6_addr64 #endif #define INET6_ADDRSTRLEN 46