diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-02-27 10:02:48 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-03-04 20:54:10 -0500 |
commit | 9bb4ca68fc48eea618b1af1c1cde2a251ae32d1b (patch) | |
tree | ce7deac1e49be133d4112d64e4d004d1e068388e /drivers/infiniband | |
parent | b6b87a1df604678ed1be40158080db012a99ccca (diff) |
iser-target: Ignore completions for FRWRs in isert_cq_tx_work
This patch changes IB_WR_FAST_REG_MR + IB_WR_LOCAL_INV related
work requests to include a ISER_FRWR_LI_WRID value in order to
signal isert_cq_tx_work() that these requests should be ignored.
This is necessary because even though IB_SEND_SIGNALED is not
set for either work request, during a QP failure event the work
requests will be returned with exception status from the TX
completion queue.
v2 changes:
- Rename ISER_FRWR_LI_WRID -> ISER_FASTREG_LI_WRID (Sagi)
Acked-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: <stable@vger.kernel.org> #3.12+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 8 | ||||
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.h | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index a70b0cf2b4c8..614a6ef6a79d 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -1751,8 +1751,10 @@ isert_cq_tx_work(struct work_struct *work) | |||
1751 | pr_debug("TX wc.status: 0x%08x\n", wc.status); | 1751 | pr_debug("TX wc.status: 0x%08x\n", wc.status); |
1752 | pr_debug("TX wc.vendor_err: 0x%08x\n", wc.vendor_err); | 1752 | pr_debug("TX wc.vendor_err: 0x%08x\n", wc.vendor_err); |
1753 | 1753 | ||
1754 | atomic_dec(&isert_conn->post_send_buf_count); | 1754 | if (wc.wr_id != ISER_FASTREG_LI_WRID) { |
1755 | isert_cq_tx_comp_err(tx_desc, isert_conn); | 1755 | atomic_dec(&isert_conn->post_send_buf_count); |
1756 | isert_cq_tx_comp_err(tx_desc, isert_conn); | ||
1757 | } | ||
1756 | } | 1758 | } |
1757 | } | 1759 | } |
1758 | 1760 | ||
@@ -2213,6 +2215,7 @@ isert_fast_reg_mr(struct fast_reg_descriptor *fr_desc, | |||
2213 | 2215 | ||
2214 | if (!fr_desc->valid) { | 2216 | if (!fr_desc->valid) { |
2215 | memset(&inv_wr, 0, sizeof(inv_wr)); | 2217 | memset(&inv_wr, 0, sizeof(inv_wr)); |
2218 | inv_wr.wr_id = ISER_FASTREG_LI_WRID; | ||
2216 | inv_wr.opcode = IB_WR_LOCAL_INV; | 2219 | inv_wr.opcode = IB_WR_LOCAL_INV; |
2217 | inv_wr.ex.invalidate_rkey = fr_desc->data_mr->rkey; | 2220 | inv_wr.ex.invalidate_rkey = fr_desc->data_mr->rkey; |
2218 | wr = &inv_wr; | 2221 | wr = &inv_wr; |
@@ -2223,6 +2226,7 @@ isert_fast_reg_mr(struct fast_reg_descriptor *fr_desc, | |||
2223 | 2226 | ||
2224 | /* Prepare FASTREG WR */ | 2227 | /* Prepare FASTREG WR */ |
2225 | memset(&fr_wr, 0, sizeof(fr_wr)); | 2228 | memset(&fr_wr, 0, sizeof(fr_wr)); |
2229 | fr_wr.wr_id = ISER_FASTREG_LI_WRID; | ||
2226 | fr_wr.opcode = IB_WR_FAST_REG_MR; | 2230 | fr_wr.opcode = IB_WR_FAST_REG_MR; |
2227 | fr_wr.wr.fast_reg.iova_start = | 2231 | fr_wr.wr.fast_reg.iova_start = |
2228 | fr_desc->data_frpl->page_list[0] + page_off; | 2232 | fr_desc->data_frpl->page_list[0] + page_off; |
diff --git a/drivers/infiniband/ulp/isert/ib_isert.h b/drivers/infiniband/ulp/isert/ib_isert.h index 41e799ff8ecc..10be55a3185e 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.h +++ b/drivers/infiniband/ulp/isert/ib_isert.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #define ISERT_RDMA_LISTEN_BACKLOG 10 | 7 | #define ISERT_RDMA_LISTEN_BACKLOG 10 |
8 | #define ISCSI_ISER_SG_TABLESIZE 256 | 8 | #define ISCSI_ISER_SG_TABLESIZE 256 |
9 | #define ISER_FASTREG_LI_WRID 0xffffffffffffffffULL | ||
9 | 10 | ||
10 | enum isert_desc_type { | 11 | enum isert_desc_type { |
11 | ISCSI_TX_CONTROL, | 12 | ISCSI_TX_CONTROL, |