[Openib-windows] RE: [PATCH] query-register mr
Fab Tillier
ftillier at silverstorm.com
Wed Sep 21 21:49:19 PDT 2005
> From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
> Sent: Wednesday, September 21, 2005 2:54 AM
>
> Fab
>
> Our verification team found that rkey get different value between ib_reg_mem
> and ib_query_mem
> The problem was that according to the API rkey and lkey should be use the
> network order (they defined as net32),
> but only the rkey in ib_reg_mem was returned using the network order
> This patch fix this and return the same endians between query_mem and reg_mem
> for rkey.
> I still think that if the API require that also the lkey should use network
> order
> we should change and return lkey also in network order.
The LKey endianess doesn't matter. The RKey endianess does because it is sent
over the wire to the remote peer who then uses it in an RDMA, and it then finds
its way over the wire again in the RDTH. Treating the RKey in network order
always removes guessing in the application and HCA driver about whether it must
be swapped or not - it is an opaque value that has meaning to the hardware, and
shouldn't be swapped ever. Since the LKey is only meaningful locally, a
consistent representation is all that matters. It was declared as a net32 to
match the RKey.
> ( I didn't do this , because I don't know if it breaks anything, but it very
> easy to do ...)
> I also add the keys check to the alts test and enable the shared memory test.
> Pls review and apply
Committed in revision 79. Thanks!
- Fab
More information about the ofw
mailing list