aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2014-07-29 17:26:04 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2014-07-31 16:22:59 -0400
commita779ca5fa766e270b9e11c162d877295e2904f4e (patch)
tree541654139d205dd1170124d44679cdc02381dfe7 /net/sunrpc
parent282191cb725db9a1aa80269e8369b06e9270a948 (diff)
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: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Tested-by: Shirley Ma <shirley.ma@oracle.com> Tested-by: Devesh Sharma <devesh.sharma@emulex.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/verbs.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 1208ab2e655f..c2253d4c64df 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -561,12 +561,7 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
561 if (!ia->ri_id->device->alloc_fmr) { 561 if (!ia->ri_id->device->alloc_fmr) {
562 dprintk("RPC: %s: MTHCAFMR registration " 562 dprintk("RPC: %s: MTHCAFMR registration "
563 "not supported by HCA\n", __func__); 563 "not supported by HCA\n", __func__);
564#if RPCRDMA_PERSISTENT_REGISTRATION
565 memreg = RPCRDMA_ALLPHYSICAL; 564 memreg = RPCRDMA_ALLPHYSICAL;
566#else
567 rc = -ENOMEM;
568 goto out2;
569#endif
570 } 565 }
571 } 566 }
572 567
@@ -581,20 +576,16 @@ rpcrdma_ia_open(struct rpcrdma_xprt *xprt, struct sockaddr *addr, int memreg)
581 switch (memreg) { 576 switch (memreg) {
582 case RPCRDMA_FRMR: 577 case RPCRDMA_FRMR:
583 break; 578 break;
584#if RPCRDMA_PERSISTENT_REGISTRATION
585 case RPCRDMA_ALLPHYSICAL: 579 case RPCRDMA_ALLPHYSICAL:
586 mem_priv = IB_ACCESS_LOCAL_WRITE | 580 mem_priv = IB_ACCESS_LOCAL_WRITE |
587 IB_ACCESS_REMOTE_WRITE | 581 IB_ACCESS_REMOTE_WRITE |
588 IB_ACCESS_REMOTE_READ; 582 IB_ACCESS_REMOTE_READ;
589 goto register_setup; 583 goto register_setup;
590#endif
591 case RPCRDMA_MTHCAFMR: 584 case RPCRDMA_MTHCAFMR:
592 if (ia->ri_have_dma_lkey) 585 if (ia->ri_have_dma_lkey)
593 break; 586 break;
594 mem_priv = IB_ACCESS_LOCAL_WRITE; 587 mem_priv = IB_ACCESS_LOCAL_WRITE;
595#if RPCRDMA_PERSISTENT_REGISTRATION
596 register_setup: 588 register_setup:
597#endif
598 ia->ri_bind_mem = ib_get_dma_mr(ia->ri_pd, mem_priv); 589 ia->ri_bind_mem = ib_get_dma_mr(ia->ri_pd, mem_priv);
599 if (IS_ERR(ia->ri_bind_mem)) { 590 if (IS_ERR(ia->ri_bind_mem)) {
600 printk(KERN_ALERT "%s: ib_get_dma_mr for " 591 printk(KERN_ALERT "%s: ib_get_dma_mr for "
@@ -1905,7 +1896,6 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
1905 1896
1906 switch (ia->ri_memreg_strategy) { 1897 switch (ia->ri_memreg_strategy) {
1907 1898
1908#if RPCRDMA_PERSISTENT_REGISTRATION
1909 case RPCRDMA_ALLPHYSICAL: 1899 case RPCRDMA_ALLPHYSICAL:
1910 rpcrdma_map_one(ia, seg, writing); 1900 rpcrdma_map_one(ia, seg, writing);
1911 seg->mr_rkey = ia->ri_bind_mem->rkey; 1901 seg->mr_rkey = ia->ri_bind_mem->rkey;
@@ -1913,7 +1903,6 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
1913 seg->mr_nsegs = 1; 1903 seg->mr_nsegs = 1;
1914 nsegs = 1; 1904 nsegs = 1;
1915 break; 1905 break;
1916#endif
1917 1906
1918 /* Registration using frmr registration */ 1907 /* Registration using frmr registration */
1919 case RPCRDMA_FRMR: 1908 case RPCRDMA_FRMR:
@@ -1943,13 +1932,11 @@ rpcrdma_deregister_external(struct rpcrdma_mr_seg *seg,
1943 1932
1944 switch (ia->ri_memreg_strategy) { 1933 switch (ia->ri_memreg_strategy) {
1945 1934
1946#if RPCRDMA_PERSISTENT_REGISTRATION
1947 case RPCRDMA_ALLPHYSICAL: 1935 case RPCRDMA_ALLPHYSICAL:
1948 read_lock(&ia->ri_qplock); 1936 read_lock(&ia->ri_qplock);
1949 rpcrdma_unmap_one(ia, seg); 1937 rpcrdma_unmap_one(ia, seg);
1950 read_unlock(&ia->ri_qplock); 1938 read_unlock(&ia->ri_qplock);
1951 break; 1939 break;
1952#endif
1953 1940
1954 case RPCRDMA_FRMR: 1941 case RPCRDMA_FRMR:
1955 rc = rpcrdma_deregister_frmr_external(seg, ia, r_xprt); 1942 rc = rpcrdma_deregister_frmr_external(seg, ia, r_xprt);