On Sat, 18 Nov 2006, M. Warner Losh wrote:

In message: <[EMAIL PROTECTED]>
           Bruce Evans <[EMAIL PROTECTED]> writes:
: On Fri, 17 Nov 2006, M. Warner Losh wrote:
:
: > In message: <[EMAIL PROTECTED]>
: >            Bruce Evans <[EMAIL PROTECTED]> writes:
: > : For that the comment should be something like:
: > :
: > :        __packed;       /* Align (sic) to work around bugs on arm (*). */
: > :
: > : but I doubt that arm is that broken.
: > :
: > : (*) See this thread for more details.
: >
: > But they aren't bugs.
:
: Er, this thread gived the details of why they are bugs.

Wait, is this the ar or the struct ip thing..  Ar is clearly needed,
but I was going to test the packedness on struct ip...  I've just had
my first son and am operating on too little sleep :-(.

I was mostly talking about struct ip.  Something is needed for struct
ar_hdr, since although it has size a multiple of 4 applications expect
it to have alignment 1 but arm gives it alignment 4.  Something is needed
for struct ether_header (which sam recently packed), since it wants to
have size 14 and alignment 2, but arm gives it size 16 and alignment 4.
Nothing shoulded be need for struct ip, since it wants to have size 20 and
alignment 4, and arm gives it that.

struct ether header now has alignment 1.  I don't like that...

Immediately after struct ether_header in <net/ethernet.h>, there is
struct ether_addr.  This wants to have size 6 and alignment 1 (it wants
to be just 6 octets), but is still unpacked so it has size 8 and
alignment 4 on arm.  It's surprising that anything in ethernet works
on arm.

Bruce
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to