XPRTRDMA: fix client rpcrdma FRMR registration on mlx4 devices
authorVu Pham <vu@mellanox.com>
Tue, 26 May 2009 18:51:00 +0000 (14:51 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 26 May 2009 18:51:00 +0000 (14:51 -0400)
mlx4/connectX FRMR requires local write enable together with remote
rdma write enable. This fixes NFS/RDMA operation over the ConnectX
Infiniband HCA in the default memreg mode.

Signed-off-by: Vu Pham <vu@mellanox.com>
Signed-off-by: Tom Talpey <tmtalpey@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtrdma/verbs.c

index 3b21e0cc5e6925413c65bb2cdf75aaa45f10dbe6..465aafc2007f5854ca846913d251f5c99e303f68 100644 (file)
@@ -1495,7 +1495,8 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg,
        frmr_wr.wr.fast_reg.page_shift = PAGE_SHIFT;
        frmr_wr.wr.fast_reg.length = i << PAGE_SHIFT;
        frmr_wr.wr.fast_reg.access_flags = (writing ?
-                               IB_ACCESS_REMOTE_WRITE : IB_ACCESS_REMOTE_READ);
+                               IB_ACCESS_REMOTE_WRITE | IB_ACCESS_LOCAL_WRITE :
+                               IB_ACCESS_REMOTE_READ);
        frmr_wr.wr.fast_reg.rkey = seg1->mr_chunk.rl_mw->r.frmr.fr_mr->rkey;
        DECR_CQCOUNT(&r_xprt->rx_ep);