[openib-general] [BUG] Byte swapped Pkeys
Sean Hefty
mshefty at ichips.intel.com
Wed Sep 15 15:50:35 PDT 2004
On Wed, 15 Sep 2004 15:28:16 -0700
Roland Dreier <roland at topspin.com> wrote:
> Fab> Personally, I would like to see all wire values handled in
> Fab> network order in the stack rather than swapped. For things
> Fab> like pkeys, QPNs, etc where the value is really opaque for
> Fab> the user, there's no value in putting it in host order.
>
> I don't think it's a big deal one way or another. I will point out
> that neither P_Key nor QPN values are opaque (the MSB of a P_Key value
> determines full membership or not, QPN is used in CM peer compare, etc).
I think it would make the interface much easier to deal with. Today, clients must deal with these values in two different formats, depending on how they get their data. It's also not clear what format clients should use. Glancing at the stack, it seems that clients receive data in big endian format via MADs, convert it to host order, then have it converted back into big endian format for use with the hardware.
Comparisons in little/big endian format doesn't matter, as long as the data is consistent.
> Are you volunteering to go through the current code base and fix up
> the endian issues? I don't have much stomach to go through everything
> and change the byte order around, and I don't have much confidence
> that I wouldn't introduce a ton of bugs anyway.
I don't really have time for this now either, but I do think removing unnecessary byte-swapping is the right thing to do.
More information about the general
mailing list