diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2014-07-29 17:25:12 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2014-07-31 16:22:56 -0400 |
commit | 050557220e34ed5acc830c9bf6cd993f6b4ea33e (patch) | |
tree | 9c324350f2c722345baf572ced1b2e7eabeaee92 /net/sunrpc | |
parent | 440ddad51b821a8ab9099addcc29d4d18d02f6ac (diff) |
xprtrdma: Disable completions for FAST_REG_MR Work Requests
Instead of relying on a completion to change the state of an FRMR
to FRMR_IS_VALID, set it in advance. If an error occurs, a completion
will fire anyway and mark the FRMR FRMR_IS_STALE.
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.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 7459b867d7d6..3e8b3881548d 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -159,10 +159,7 @@ rpcrdma_sendcq_process_wc(struct ib_wc *wc) | |||
159 | return; | 159 | return; |
160 | } | 160 | } |
161 | 161 | ||
162 | if (wc->opcode == IB_WC_FAST_REG_MR) | 162 | frmr->r.frmr.fr_state = FRMR_IS_INVALID; |
163 | frmr->r.frmr.fr_state = FRMR_IS_VALID; | ||
164 | else if (wc->opcode == IB_WC_LOCAL_INV) | ||
165 | frmr->r.frmr.fr_state = FRMR_IS_INVALID; | ||
166 | } | 163 | } |
167 | 164 | ||
168 | static int | 165 | static int |
@@ -1727,10 +1724,11 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg, | |||
1727 | dprintk("RPC: %s: Using frmr %p to map %d segments\n", | 1724 | dprintk("RPC: %s: Using frmr %p to map %d segments\n", |
1728 | __func__, mw, i); | 1725 | __func__, mw, i); |
1729 | 1726 | ||
1727 | frmr->fr_state = FRMR_IS_VALID; | ||
1728 | |||
1730 | memset(&frmr_wr, 0, sizeof frmr_wr); | 1729 | memset(&frmr_wr, 0, sizeof frmr_wr); |
1731 | frmr_wr.wr_id = (unsigned long)(void *)mw; | 1730 | frmr_wr.wr_id = (unsigned long)(void *)mw; |
1732 | frmr_wr.opcode = IB_WR_FAST_REG_MR; | 1731 | frmr_wr.opcode = IB_WR_FAST_REG_MR; |
1733 | frmr_wr.send_flags = IB_SEND_SIGNALED; | ||
1734 | frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma; | 1732 | frmr_wr.wr.fast_reg.iova_start = seg1->mr_dma; |
1735 | frmr_wr.wr.fast_reg.page_list = frmr->fr_pgl; | 1733 | frmr_wr.wr.fast_reg.page_list = frmr->fr_pgl; |
1736 | frmr_wr.wr.fast_reg.page_list_len = page_no; | 1734 | frmr_wr.wr.fast_reg.page_list_len = page_no; |
@@ -1766,6 +1764,7 @@ rpcrdma_register_frmr_external(struct rpcrdma_mr_seg *seg, | |||
1766 | *nsegs = i; | 1764 | *nsegs = i; |
1767 | return 0; | 1765 | return 0; |
1768 | out_err: | 1766 | out_err: |
1767 | frmr->fr_state = FRMR_IS_INVALID; | ||
1769 | while (i--) | 1768 | while (i--) |
1770 | rpcrdma_unmap_one(ia, --seg); | 1769 | rpcrdma_unmap_one(ia, --seg); |
1771 | return rc; | 1770 | return rc; |