On Thu, Mar 22, 2012 at 3:44 PM, Jason Gunthorpe <[email protected]> wrote: > For hardware facing structures I'd combine this with a static assert > to verify structure size at compile time. > > So.. > > 1) Avoid using attributes unless the structure has unaligned members. > 2) Avoid creating structures with unaligned members (eg for userspace > communication) > 3) Frown at hardware/firmware developers who make communication > structures with unaligned members :) > 4) Be explicit about padding in your layout for 64/32 > compatibility.
Excellent summary, thanks Jason. - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
