[openib-general] Re: vapi versus openib imm_data
Pete Wyckoff
pw at osc.edu
Mon May 22 11:14:41 PDT 2006
ftillier at silverstorm.com wrote on Mon, 22 May 2006 09:43 -0700:
> On 5/22/06, Sean Hefty <sean.hefty at intel.com> wrote:
> >>Thanks both. I'll solve this by adding htonl/ntohl, only on the
> >>VAPI side
> >
> >Since VAPI is wanting the data in host order, while openib uses network
> >order,
> >it makes more sense to me to do the swapping on the openib side.
>
> 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.
Even though it would be more efficient today for my little-endian
hosts to do the byteswap on the OpenIB side only, I share Fab's
thoughts about what the more prevalent API will be in the future.
The app in question has already handled swapping the immediate data
above the network layer, to support heterogeneous configurations. I
didn't expect a byte-swapping service from VAPI or OpenIB and was a
bit surprised to find that VAPI provides it. Correcting it on the
VAPI side rather than the OpenIB side fits my expectations better,
and hopefully is more natural for other programmers with a sockets
background too.
-- Pete
More information about the general
mailing list