Commit a779ca5f authored by Chuck Lever's avatar Chuck Lever Committed by Anna Schumaker

xprtrdma: Remove RPCRDMA_PERSISTENT_REGISTRATION macro

Clean up.

RPCRDMA_PERSISTENT_REGISTRATION was a compile-time switch between
RPCRDMA_REGISTER mode and RPCRDMA_ALLPHYSICAL mode.  Since
RPCRDMA_REGISTER has been removed, there's no need for the extra
conditional compilation.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Tested-by: default avatarSteve Wise <swise@opengridcomputing.com>
Tested-by: default avatarShirley Ma <shirley.ma@oracle.com>
Tested-by: default avatarDevesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 282191cb
...@@ -62,8 +62,6 @@ ...@@ -62,8 +62,6 @@
#define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */ #define RPCRDMA_INLINE_PAD_THRESH (512)/* payload threshold to pad (bytes) */
/* memory registration strategies */ /* memory registration strategies */
#define RPCRDMA_PERSISTENT_REGISTRATION (1)
enum rpcrdma_memreg { enum rpcrdma_memreg {
RPCRDMA_BOUNCEBUFFERS = 0, RPCRDMA_BOUNCEBUFFERS = 0,
RPCRDMA_REGISTER, RPCRDMA_REGISTER,
......
...@@ -561,12 +561,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) ...@@ -561,12 +561,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
if (!ia->ri_id->device->alloc_fmr) { if (!ia->ri_id->device->alloc_fmr) {
dprintk("RPC: %s: MTHCAFMR registration " dprintk("RPC: %s: MTHCAFMR registration "
"not supported by HCA\n", __func__); "not supported by HCA\n", __func__);
#if RPCRDMA_PERSISTENT_REGISTRATION
memreg = RPCRDMA_ALLPHYSICAL; memreg = RPCRDMA_ALLPHYSICAL;
#else
rc = -ENOMEM;
goto out2;
#endif
} }
} }
...@@ -581,20 +576,16 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg) ...@@ -581,20 +576,16 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
switch (memreg) { switch (memreg) {
case RPCRDMA_FRMR: case RPCRDMA_FRMR:
break; break;
#if RPCRDMA_PERSISTENT_REGISTRATION
case RPCRDMA_ALLPHYSICAL: case RPCRDMA_ALLPHYSICAL:
mem_priv = IB_ACCESS_LOCAL_WRITE | mem_priv = IB_ACCESS_LOCAL_WRITE |
IB_ACCESS_REMOTE_WRITE | IB_ACCESS_REMOTE_WRITE |
IB_ACCESS_REMOTE_READ; IB_ACCESS_REMOTE_READ;
goto register_setup; goto register_setup;
#endif
case RPCRDMA_MTHCAFMR: case RPCRDMA_MTHCAFMR:
if (ia->ri_have_dma_lkey) if (ia->ri_have_dma_lkey)
break; break;
mem_priv = IB_ACCESS_LOCAL_WRITE; mem_priv = IB_ACCESS_LOCAL_WRITE;
#if RPCRDMA_PERSISTENT_REGISTRATION
register_setup: register_setup:
#endif
ia->ri_bind_mem = ib_get_dma_mr(ia->ri_pd, mem_priv); ia->ri_bind_mem = ib_get_dma_mr(ia->ri_pd, mem_priv);
if (IS_ERR(ia->ri_bind_mem)) { if (IS_ERR(ia->ri_bind_mem)) {
printk(KERN_ALERT "%s: ib_get_dma_mr for " printk(KERN_ALERT "%s: ib_get_dma_mr for "
...@@ -1905,7 +1896,6 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg, ...@@ -1905,7 +1896,6 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
switch (ia->ri_memreg_strategy) { switch (ia->ri_memreg_strategy) {
#if RPCRDMA_PERSISTENT_REGISTRATION
case RPCRDMA_ALLPHYSICAL: case RPCRDMA_ALLPHYSICAL:
rpcrdma_map_one(ia, seg, writing); rpcrdma_map_one(ia, seg, writing);
seg->mr_rkey = ia->ri_bind_mem->rkey; seg->mr_rkey = ia->ri_bind_mem->rkey;
...@@ -1913,7 +1903,6 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg, ...@@ -1913,7 +1903,6 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
seg->mr_nsegs = 1; seg->mr_nsegs = 1;
nsegs = 1; nsegs = 1;
break; break;
#endif
/* Registration using frmr registration */ /* Registration using frmr registration */
case RPCRDMA_FRMR: case RPCRDMA_FRMR:
...@@ -1943,13 +1932,11 @@ rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg, ...@@ -1943,13 +1932,11 @@ rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg,
switch (ia->ri_memreg_strategy) { switch (ia->ri_memreg_strategy) {
#if RPCRDMA_PERSISTENT_REGISTRATION
case RPCRDMA_ALLPHYSICAL: case RPCRDMA_ALLPHYSICAL:
read_lock(&ia->ri_qplock); read_lock(&ia->ri_qplock);
rpcrdma_unmap_one(ia, seg); rpcrdma_unmap_one(ia, seg);
read_unlock(&ia->ri_qplock); read_unlock(&ia->ri_qplock);
break; break;
#endif
case RPCRDMA_FRMR: case RPCRDMA_FRMR:
rc = rpcrdma_deregister_frmr_external(seg, ia, r_xprt); rc = rpcrdma_deregister_frmr_external(seg, ia, r_xprt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment