[openib-general] user-mode data strucures
Tom Tucker
tom at opengridcomputing.com
Tue Sep 12 13:18:59 PDT 2006
Roland:
The user-mode data structures do not include specific alignment
instructions to compilers. This all works great provided that the
libraries and the applications are built using the same compiler.
In working with the Intel compilers recently, however, I've found that
this compiler attempts to align data structures on boundaries that are
native to the data types. So uint64_t's are aligned on a 64b boundary.
This is an issue for ibv_recv_wr and ibv_send_wr because they are
immediately preceded by a *next ptr which is 32b on 32b architectures.
To make a long story short, I've added __attribute__((packed)) to my
locally installed header files to make this work, but we should probably
either pad these data structures internally or explicitly pack them like
I'm doing now.
What do people think?
Tom
More information about the general
mailing list