lkml.org 
[lkml]   [1996]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectipv6 structure alignment?
>>>>> "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.

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.068 / U:2.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site