public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
To: "robert-4JaGZRWAfWbajFs6igw21g@public.gmane.org"
	<robert-4JaGZRWAfWbajFs6igw21g@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] Clear out stuck ops to prevent iSER from going init D state
Date: Mon, 23 Jan 2017 19:10:27 +0000	[thread overview]
Message-ID: <1485198613.2825.4.camel@sandisk.com> (raw)
In-Reply-To: <CAANLjFpi2E-2UxS3YSgjN=GzyZdLBhqJa4LN++52HTw6_3DKJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, 2017-01-23 at 12:01 -0700, Robert LeBlanc wrote:
> diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
> index 8368764..ed36748 100644
> --- a/drivers/infiniband/core/verbs.c
> +++ b/drivers/infiniband/core/verbs.c
> @@ -2089,3 +2089,19 @@ void ib_drain_qp(struct ib_qp *qp)
>                ib_drain_rq(qp);
> }
> EXPORT_SYMBOL(ib_drain_qp);
> +
> +void ib_reset_sq(struct ib_qp *qp)
> +{
> +       struct ib_qp_attr attr = { .qp_state = IB_QPS_RESET};
> +       int ret;
> +
> +       ret = ib_modify_qp(qp, &attr, IB_QP_STATE);
> +}
> +EXPORT_SYMBOL(ib_reset_sq);
> +
> +void ib_reset_qp(struct ib_qp *qp)
> +{
> +       printk("ib_reset_qp calling ib_reset_sq.\n");
> +       ib_reset_sq(qp);
> +}
> +EXPORT_SYMBOL(ib_reset_qp);

These are one liners. Is it really worth to add one-line functions to the
IB core?

> diff --git a/drivers/infiniband/ulp/isert/ib_isert.c
> b/drivers/infiniband/ulp/isert/ib_isert.c
> index 6dd43f6..619dbc7 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -2595,10 +2595,9 @@ static void isert_wait_conn(struct iscsi_conn *conn)
>        isert_conn_terminate(isert_conn);
>        mutex_unlock(&isert_conn->mutex);
> 
> -       ib_drain_qp(isert_conn->qp);
> +       ib_reset_qp(isert_conn->qp);
>        isert_put_unsol_pending_cmds(conn);
> -       isert_wait4cmds(conn);
> -       isert_wait4logout(isert_conn);
> +       cancel_work_sync(&isert_conn->release_work);
> 
>        queue_work(isert_release_wq, &isert_conn->release_work);
> }

Sorry but leaving out the ib_drain_qp() and isert_wait*() calls seems wrong
to me. Additionally, resetting the send queue should not be needed since the
iSER target driver should guarantee that no new WRs will be queued on the
send queue after isert_wait_conn() is called.

Seeing this patch makes me wonder whether this behavior can be reproduced
with any other HBA than ConnectX-4 Lx? Is this a software or a firmware bug?

Thanks,

Bart.--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-01-23 19:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 19:01 [RFC] Clear out stuck ops to prevent iSER from going init D state Robert LeBlanc
     [not found] ` <CAANLjFpi2E-2UxS3YSgjN=GzyZdLBhqJa4LN++52HTw6_3DKJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-23 19:10   ` Bart Van Assche [this message]
     [not found]     ` <1485198613.2825.4.camel-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2017-01-23 19:24       ` Robert LeBlanc
2017-01-23 20:20       ` Laurence Oberman
     [not found]         ` <1131067681.19851058.1485202831888.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-23 21:41           ` Laurence Oberman
     [not found]             ` <854924612.19878721.1485207662742.JavaMail.zimbra-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-01-23 22:42               ` Robert LeBlanc
2017-01-23 22:20   ` Sagi Grimberg
2017-01-23 22:32     ` Target core task management function handling rework Bart Van Assche
2017-01-23 22:43       ` Sagi Grimberg
2017-01-23 23:15         ` Robert LeBlanc
     [not found]     ` <07f540b9-f57b-6110-d94c-9ab0e9766b1b-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-01-23 23:12       ` [RFC] Clear out stuck ops to prevent iSER from going init D state Robert LeBlanc
     [not found]         ` <CAANLjFp3Zo_QpR7WCmVOfO0AEDxCXabbenac3KNR-RosCgGx+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-24 10:37           ` Max Gurtovoy
     [not found]             ` <c7f1af87-a846-ed8a-a46e-ab5888ea9b92-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2017-01-24 21:59               ` Robert LeBlanc
     [not found]                 ` <CAANLjFo1N=1BqY8Vur8jheDP4h9_9Q7Ns7MsgbRJX+TDhJbcOw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-24 22:26                   ` Bart Van Assche
2017-01-26 10:52                   ` Sagi Grimberg
     [not found]                     ` <21bfa6a7-9199-9341-1193-7d186fd36326-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-01-26 18:05                       ` Robert LeBlanc
     [not found]                         ` <CAANLjFpVMMp9kaqmugT0yxoR=0f0gmvxGzhBnW-djXyZgMN-CA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-27 23:18                           ` Robert LeBlanc
2017-01-29  7:42                           ` Sagi Grimberg
     [not found]                             ` <b5beb647-31f1-30d2-1162-2398f654c63d-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-01-29 19:13                               ` Robert LeBlanc
     [not found]                                 ` <CAANLjFoFocDMFFCSvYsGzYHOoRT-5DD3UDVpf51j9mU--LVL+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-30  7:39                                   ` Sagi Grimberg
     [not found]                                     ` <4be8cfd7-c50c-18a2-347a-745e4a70113a-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>
2017-01-30 19:36                                       ` Robert LeBlanc
     [not found]                                         ` <CAANLjFqNu2EjkWJGtRx=kjcgSq5SmyJJ2xnvMsgrJEu7Un0CzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-01 17:56                                           ` Robert LeBlanc
2017-01-24 21:49           ` Robert LeBlanc

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=1485198613.2825.4.camel@sandisk.com \
    --to=bart.vanassche-xdaiopvojttbdgjk7y7tuq@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robert-4JaGZRWAfWbajFs6igw21g@public.gmane.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