Skip to content

Commit 9bb4ca6

Browse files
author
Nicholas Bellinger
committed
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>
1 parent b6b87a1 commit 9bb4ca6

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

drivers/infiniband/ulp/isert/ib_isert.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,8 +1751,10 @@ isert_cq_tx_work(struct work_struct *work)
17511751
pr_debug("TX wc.status: 0x%08x\n", wc.status);
17521752
pr_debug("TX wc.vendor_err: 0x%08x\n", wc.vendor_err);
17531753

1754-
atomic_dec(&isert_conn->post_send_buf_count);
1755-
isert_cq_tx_comp_err(tx_desc, isert_conn);
1754+
if (wc.wr_id != ISER_FASTREG_LI_WRID) {
1755+
atomic_dec(&isert_conn->post_send_buf_count);
1756+
isert_cq_tx_comp_err(tx_desc, isert_conn);
1757+
}
17561758
}
17571759
}
17581760

@@ -2213,6 +2215,7 @@ isert_fast_reg_mr(struct fast_reg_descriptor *fr_desc,
22132215

22142216
if (!fr_desc->valid) {
22152217
memset(&inv_wr, 0, sizeof(inv_wr));
2218+
inv_wr.wr_id = ISER_FASTREG_LI_WRID;
22162219
inv_wr.opcode = IB_WR_LOCAL_INV;
22172220
inv_wr.ex.invalidate_rkey = fr_desc->data_mr->rkey;
22182221
wr = &inv_wr;
@@ -2223,6 +2226,7 @@ isert_fast_reg_mr(struct fast_reg_descriptor *fr_desc,
22232226

22242227
/* Prepare FASTREG WR */
22252228
memset(&fr_wr, 0, sizeof(fr_wr));
2229+
fr_wr.wr_id = ISER_FASTREG_LI_WRID;
22262230
fr_wr.opcode = IB_WR_FAST_REG_MR;
22272231
fr_wr.wr.fast_reg.iova_start =
22282232
fr_desc->data_frpl->page_list[0] + page_off;

drivers/infiniband/ulp/isert/ib_isert.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#define ISERT_RDMA_LISTEN_BACKLOG 10
88
#define ISCSI_ISER_SG_TABLESIZE 256
9+
#define ISER_FASTREG_LI_WRID 0xffffffffffffffffULL
910

1011
enum isert_desc_type {
1112
ISCSI_TX_CONTROL,

0 commit comments

Comments
 (0)