[openib-general] [PATCH] relocate SA MAD definitions to ib_mad.h

Sean Hefty mshefty at ichips.intel.com
Tue Apr 19 16:35:25 PDT 2005


Roland Dreier wrote:

> By the way:
> 
>     > +/*
>     > + * These structures must be packed because they have 64-bit fields
>     > + * that are only 32-bit aligned.  64-bit architectures will lay them
>     > + * out wrong otherwise.  (And unfortunately they are sent on the wire
>     > + * so we can't change the layout)
>     > + */
> 
> I just had a quick look at ib_mad.h and it seems that none of the
> packed structures already in that file actually need the
> __attribute__((packed)) -- everything is already aligned to its size
> as far as I can tell.  It might be worth checking to make sure I'm not
> missing anything, and then removing the packed attribute -- if nothing
> else, this will shrink the IA64 code a fair bit.

I'll double check this and remove the attribute packed if so.

- Sean




More information about the general mailing list