[openib-general] Re: vapi versus openib imm_data

Fabian Tillier ftillier at silverstorm.com
Mon May 22 10:16:37 PDT 2006


On 5/22/06, Sean Hefty <mshefty at ichips.intel.com> wrote:
> Fabian Tillier wrote:
> > It doesn't matter what VAPI wants - it's the application that matters.
> > If the application is using the immediate data for flags, you don't
> > need any swapping on the OpenIB side of things, and you can avoid the
> > swap altogether.  While this makes the VAPI implementation less
> > efficient (two swaps of the immediate data), hopefully that
> > implementation will be replaced overtime with OpenIB leaving an
> > optimal solution.  Again, this all depends on what the app is doing
> > with the immediate data.
>
> If you run openib on different platforms, one big endian and the other little
> endiand, this doesn't work.

If you swap the flag constants in little endian systems so they're
always in network order - something the compiler can do for you - then
you're checking for a bit, and it is safe to treat the value in
network order always.  The flag constant will be different in little
endian and big endian, but will represent the same bit.

If you do any arithmetic, then you need it in host order.

- Fab



More information about the general mailing list