Re: [PATCH 2/9] ocrdma: Driver for Emulex OneConnect RDMA adapter
From: Roland Dreier <hidden>
Date: 2012-03-22 23:45:43
Also in:
linux-rdma
From: Roland Dreier <hidden>
Date: 2012-03-22 23:45:43
Also in:
linux-rdma
On Thu, Mar 22, 2012 at 3:44 PM, Jason Gunthorpe [off-list ref] 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html