[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 03109) Re: ipv6_addr_cmp performance patch



On Wed, 10 Nov 2004, Herbert Xu wrote:

What if the addresses are not aligned on a platform where it matters?

Can this at all happen with the sockaddr_in6/in6_addr alignment requirements? It is already a union of uint32_t.


I suppose it can happen if a user is handcrafting his structures, not letting the compiler align properly, but I would say this is a bug if done.

With the size of the union a nice power of 2 (16 bytes) it is extremely unlikely there is alignment padding holes which might eventually cause different alignment of the different types of the union..

Regards
Henrik