[openib-general] ibv_get_device_guid() not byte swapping

Sean Hefty mshefty at ichips.intel.com
Tue Sep 6 14:37:04 PDT 2005


Has anyone else seen errors with byte swapping in ibv_get_device_guid()?  I'm 
seeing a condition where the initial 2-bytes of the GUID are not swapped.  The 
actual code in device.c appears to be correct, and if I insert a printf before 
returning from the call, then the returned GUID is correct.  (I'm using SuSE, 
with gcc 3.3.3.)

If I change guid from a uint16_t guid[4] to:

union {
	uint16_t parts[4];
	uint64_t whole;
} guid;

I can get the expected results.

- Sean



More information about the general mailing list