ipv6 structure alignment?

Pedro Roque (roque@di.fc.ul.pt)
Sun, 10 Nov 1996 00:14:06 GMT


>>>>> "Richard" == Richard Henderson <richard@atheist.tamu.edu> writes:

Richard> I have a version of csum_ipv6_magic optimized for the
Richard> Alpha, but in implementing it I would prefer struct
Richard> in6_addr aligned on a 64-bit boundary.

It will *normally* apear to the checksum function with 64-bit alignment.
It is just not always guarantied to be that way (actually i should check
struct sock to make sure that the alignment is on 64bits).
Those address will usually be passed as pointers to the packet header itself
which is aligned on 64bits...

Richard> Can someone tell me which of the structures in the kernel
Richard> headers are seen on the wire (and so would care about a
Richard> structure size change due to alignment) and which are
Richard> just internal?

Basically ipv6hdr, icmpv6hdr, nd something, and so on...
64 bit alignment has been demanded by just about everybody during header
design phase so it shouldn't be a problem.

Richard> I looked through the ones in include/linux, figuring that
Richard> the ones in include/net would all be internal, and found
Richard> that in6_rtmsg and in6_pktinfo would be affected.

They are both internal, but in6_pktinfo is being defined as standard...
(although the order shouldn't be relevant it ends up being important
for stuff like binary emulation)
I changed in6_rtmsg already... I'll also change in6_pktinfo and mail
the draft authors.

Richard> Oh, and there is a typo in the generic csum_ipv6_magic.
Thanks...

./Pedro.