[ewg] [GIT PULL ofed-1.4.1] xprtrdma: The frmr iova_start values are truncated by the nfs rdma client.

Steve Wise swise at opengridcomputing.com
Sun Apr 26 12:01:22 PDT 2009


Vu,

The server side is correct as-is.  The crash I was seeing was due to 
_removing_ the recast on the server side like you suggested.  That cast 
_is_ needed to avoid a sign extension when the void * is assigned into 
the u64.


Vlad,

Please pull the client fix from:

ssh://vlad@sofa.openfabrics.org/~swise/scm/ofed-1.4.git ofed_1_4

Thanks,

Steve.




Steve Wise wrote:
>
> Vu Pham wrote:
>> Steve,
>>
>> You should have the same fix for the server side as well
>> Here is the patch
>>
>
> Actually, I don't think this server change is needed.  The server is 
> using a kernel virtual address as the iova_start, which is 32b on a 
> 32b system.  The client, however, is using a bus address, which is 64b.
>
> However, the server side is still crashing for me so I'm debugging...
>
> Steve.
>
>
>> -vu
>>
>>>
>>>
>>>
>>> A bad cast causes the iova_start, which in this case is a DMA bus 
>>> address,
>>> to be truncated on 32b systems.  No cast is needed.
>>>
>>> Signed-off-by: Steve Wise <swise at opengridcomputing.com>
>>> ---
>>>
>>> net/sunrpc/xprtrdma/verbs.c |    2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
>>> index 3b21e0c..3a374f5 100644
>>> --- a/net/sunrpc/xprtrdma/verbs.c
>>> +++ b/net/sunrpc/xprtrdma/verbs.c
>>> @@ -1489,7 +1489,7 @@ rpcrdma_register_frmr_external(struct 
>>> rpcrdma_mr_seg *seg,
>>>     memset(&frmr_wr, 0, sizeof frmr_wr);
>>>     frmr_wr.opcode = IB_WR_FAST_REG_MR;
>>>     frmr_wr.send_flags = 0;            /* unsignaled */
>>> -    frmr_wr.wr.fast_reg.iova_start = (unsigned long)seg1->mr_dma;
>>> +    frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma;
>>>     frmr_wr.wr.fast_reg.page_list = 
>>> seg1->mr_chunk.rl_mw->r.frmr.fr_pgl;
>>>     frmr_wr.wr.fast_reg.page_list_len = i;
>>>     frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT;
>>>
>>>
>>>
>>> _______________________________________________
>>> ewg mailing list
>>> ewg at lists.openfabrics.org
>>> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg
>>
>
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg




More information about the ewg mailing list