From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: "Nicholas A. Bellinger" <nab@daterainc.com>,
target-devel <target-devel@vger.kernel.org>
Cc: linux-rdma <linux-rdma@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Or Gerlitz <ogerlitz@mellanox.com>,
Sagi Grimberg <sagig@mellanox.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: Re: [PATCH 5/6] iser-target: Ignore completions for FRWRs in isert_cq_tx_work
Date: Tue, 04 Mar 2014 16:51:11 +0200 [thread overview]
Message-ID: <5315E85F.2090904@dev.mellanox.co.il> (raw)
In-Reply-To: <1393891265-22910-6-git-send-email-nab@daterainc.com>
On 3/4/2014 2:01 AM, Nicholas A. Bellinger wrote:
> From: Nicholas Bellinger <nab@linux-iscsi.org>
>
> 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.
>
> Cc: Sagi Grimberg <sagig@mellanox.com>
> Cc: Or Gerlitz <ogerlitz@mellanox.com>
> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
> ---
> drivers/infiniband/ulp/isert/ib_isert.c | 8 ++++++--
> 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 c9d488f..003b5d0 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -1738,8 +1738,10 @@ isert_cq_tx_work(struct work_struct *work)
> pr_debug("TX wc.status: 0x%08x\n", wc.status);
> pr_debug("TX wc.vendor_err: 0x%08x\n", wc.vendor_err);
>
> - atomic_dec(&isert_conn->post_send_buf_count);
> - isert_cq_tx_comp_err(tx_desc, isert_conn);
> + if (wc.wr_id != ISER_FRWR_LI_WRID) {
Better to use ISER_FASTREG_LI_WRID - I changed it in the initiator.
> + atomic_dec(&isert_conn->post_send_buf_count);
> + isert_cq_tx_comp_err(tx_desc, isert_conn);
> + }
> }
> }
>
> @@ -2202,6 +2204,7 @@ isert_fast_reg_mr(struct fast_reg_descriptor *fr_desc,
>
> if (!fr_desc->valid) {
> memset(&inv_wr, 0, sizeof(inv_wr));
> + inv_wr.wr_id = ISER_FRWR_LI_WRID;
> inv_wr.opcode = IB_WR_LOCAL_INV;
> inv_wr.ex.invalidate_rkey = fr_desc->data_mr->rkey;
> wr = &inv_wr;
> @@ -2212,6 +2215,7 @@ isert_fast_reg_mr(struct fast_reg_descriptor *fr_desc,
>
> /* Prepare FASTREG WR */
> memset(&fr_wr, 0, sizeof(fr_wr));
> + fr_wr.wr_id = ISER_FRWR_LI_WRID;
> fr_wr.opcode = IB_WR_FAST_REG_MR;
> fr_wr.wr.fast_reg.iova_start =
> 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 41e799f..599b4e2 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.h
> +++ b/drivers/infiniband/ulp/isert/ib_isert.h
> @@ -6,6 +6,7 @@
>
> #define ISERT_RDMA_LISTEN_BACKLOG 10
> #define ISCSI_ISER_SG_TABLESIZE 256
> +#define ISER_FRWR_LI_WRID 0xffffffffffffffffULL
>
> enum isert_desc_type {
> ISCSI_TX_CONTROL,
next prev parent reply other threads:[~2014-03-04 14:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 0:00 [PATCH 0/6] iser-target: Fix active I/O shutdown related issues Nicholas A. Bellinger
[not found] ` <1393891265-22910-1-git-send-email-nab-PEzghdH756F8UrSeD/g0lQ@public.gmane.org>
2014-03-04 0:01 ` [PATCH 1/6] iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug Nicholas A. Bellinger
2014-03-04 0:01 ` [PATCH 2/6] iscsi/iser-target: Use list_del_init for ->i_conn_node Nicholas A. Bellinger
2014-03-04 0:01 ` [PATCH 3/6] iscsi/iser-target: Fix isert_conn->state hung shutdown issues Nicholas A. Bellinger
2014-03-04 0:01 ` [PATCH 4/6] iser-target: Fix post_send_buf_count for RDMA READ/WRITE Nicholas A. Bellinger
2014-03-04 7:49 ` Or Gerlitz
2014-03-04 9:21 ` Sagi Grimberg
2014-03-04 0:01 ` [PATCH 5/6] iser-target: Ignore completions for FRWRs in isert_cq_tx_work Nicholas A. Bellinger
2014-03-04 14:51 ` Sagi Grimberg [this message]
[not found] ` <5315E85F.2090904-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-03-04 23:56 ` Nicholas A. Bellinger
2014-03-04 0:01 ` [PATCH 6/6] iser-target: Fix command leak for tx_desc->comp_llnode_batch Nicholas A. Bellinger
2014-03-04 15:17 ` [PATCH 0/6] iser-target: Fix active I/O shutdown related issues Sagi Grimberg
[not found] ` <5315EE7C.3030806-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2014-03-05 0:06 ` Nicholas A. Bellinger
2014-03-05 12:12 ` Sagi Grimberg
2014-03-05 22:04 ` Nicholas A. Bellinger
[not found] ` <1394057083.20601.51.camel-XoQW25Eq2zviZyQQd+hFbcojREIfoBdhmpATvIKMPHk@public.gmane.org>
2014-03-06 14:05 ` sagi grimberg
2014-03-10 22:00 ` Nicholas A. Bellinger
2014-03-11 10:27 ` Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5315E85F.2090904@dev.mellanox.co.il \
--to=sagig@dev.mellanox.co.il \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@daterainc.com \
--cc=nab@linux-iscsi.org \
--cc=ogerlitz@mellanox.com \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox