[openib-general] [PATCH] IB/core - ib_umad can cause address alignment fault onia64
Michael S. Tsirkin
mst at mellanox.co.il
Thu Jan 18 13:16:02 PST 2007
> Quoting Jason Gunthorpe <jgunthorpe at obsidianresearch.com>:
> Subject: Re: [openib-general] [PATCH] IB/core - ib_umad can cause address alignment fault onia64
>
> On Thu, Jan 18, 2007 at 12:17:35PM -0600, Tom Tucker wrote:
>
> > Does changing the size of the structure break the ABI?
>
> ib_user_mad_hdr is 56 bytes long, that is already a multiple of 8 so
> .data is already aligned on 8. Thus the size of ib_user_mad does not
> change and there is no ABI concern here.
>
> __u64 data[0] is still 0 size, just like __u8 data[0].
>
> Really all that happens is that the compiler will mark ib_user_mad as
> requiring 8 byte alignment on ia64/etc and 4 byte on x86-64/etc, which
> gets you the pad you need in the ib_umad_packet structure.
I believe you are right.
Can you post a patch that does this? I'm not in the lab now.
--
MST
More information about the general
mailing list