[ofw] incorrect SID generation in WvGetServiceId

Fab Tillier ftillier at microsoft.com
Fri Feb 11 10:44:44 PST 2011


Fab Tillier wrote on Fri, 11 Feb 2011 at 10:40:14

> Fab Tillier wrote on Fri, 11 Feb 2011 at 10:25:22
> 
>> Hi Sean,
>> 
>> WvGetServiceId swaps the port number in the sockaddr but shouldn't.  The
>> port number in a sockaddr structure is already in network order.  See
>> http://msdn.microsoft.com/en-us/library/ff570823(VS.85).aspx, the
>> remarks section:
>> " All of the data in the SOCKADDR_IN structure, except for the address
>> family, must be specified in network-byte-order (big-endian)."
> 
> Never mind this, I missed the nesting of the two byteswap calls.  However,
> the function does not set the IB_REQ_CM_RDMA_SID_PREFIX.  The ND
> provider SID generation (as well as the logic in the CEP manager for
> detecting RDMA CM requests) is also busted in that it doesn't swap the SID
> and thus treats it as a little-endian.

Never mind this too, it wasn't clear that the RDMA CM bit was encoded in the ep_type field.  WinVerbs is fine.  ND is however broken.

-Fab



More information about the ofw mailing list