From: "Bernard Metzler" <BMT@zurich.ibm.com>
To: "Krishnamraju Eraparaju" <krishna2@chelsio.com>
Cc: "jgg@ziepe.ca" <jgg@ziepe.ca>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"Potnuri Bharat Teja" <bharat@chelsio.com>,
"Nirranjan Kirubaharan" <nirranjan@chelsio.com>
Subject: Re: Re: Re: Re: Re: [PATCH for-next] RDMA/siw: fix SQ/RQ drain logic to support ib_drain_qp
Date: Fri, 4 Oct 2019 13:47:44 +0000 [thread overview]
Message-ID: <OFBE05CE37.CBF33C8C-ON00258489.004868EE-00258489.004BC858@notes.na.collabserv.com> (raw)
In-Reply-To: <20191004045718.GA29290@chelsio.com>
-----"Krishnamraju Eraparaju" <krishna2@chelsio.com> wrote: -----
>To: "Bernard Metzler" <BMT@zurich.ibm.com>
>From: "Krishnamraju Eraparaju" <krishna2@chelsio.com>
>Date: 10/04/2019 06:57AM
>Cc: "jgg@ziepe.ca" <jgg@ziepe.ca>, "linux-rdma@vger.kernel.org"
><linux-rdma@vger.kernel.org>, "Potnuri Bharat Teja"
><bharat@chelsio.com>, "Nirranjan Kirubaharan" <nirranjan@chelsio.com>
>Subject: [EXTERNAL] Re: Re: Re: Re: [PATCH for-next] RDMA/siw: fix
>SQ/RQ drain logic to support ib_drain_qp
>
>On Thursday, October 10/03/19, 2019 at 14:03:05 +0000, Bernard
>Metzler wrote:
>> There are other reasons why the generic
>> __ib_drain_sq() may fail. A CQ overflow is one
>> such candidate. Failures are not handled by the ULP,
>> since calling a void function.
>The function description of ib_drain_qp() says:
> * The caller must:
> *
> * ensure there is room in the CQ(s), SQ, and RQ for drain work
>requests
> * and completions.
> *
> * allocate the CQs using ib_alloc_cq().
> *
> * ensure that there are no other contexts that are posting WRs
> * concurrently.
> * Otherwise the drain is not guaranteed.
> */
>
Yes, I know. Imho, this guarantee falls into the same category
as assuming a sane ULP which will not try to change the QP state
at the same time while calling for sq_drain. A CQ overflow would
be a miscalculation of its size by the ULP. A drain_sq in parallel
with a modify_qp call just another misbehaving..? Anyway, I think
you are right, let's handle explicitly all cases we can handle.
>
>So, it looks like ULP has to check for available CQs before calling
>ib_drain_xx().
>>
>> At the other hand, we know that if we have reached
>> ERROR state, the QP will never escape back to become
>> full functional; ERROR is the QP's final state.
>>
>> So we could do an extra check if we cannot get
>> the state lock - if we are already in ERROR. And
>> if yes, complete immediately there as well.
>>
>> I can change the patch accordingly. Makes sense?
>Yes, I think addressing this would make the fix complete.
>
sent.
I'll be away whole next week from tonight on.
Thanks
Bernard.
>Thanks,
>Krishna.
>
>
prev parent reply other threads:[~2019-10-04 13:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 22:15 [PATCH for-next] RDMA/siw: fix SQ/RQ drain logic to support ib_drain_qp Krishnamraju Eraparaju
2019-09-30 15:37 ` Bernard Metzler
2019-10-01 9:52 ` Krishnamraju Eraparaju
2019-10-01 15:56 ` Bernard Metzler
2019-10-01 17:45 ` Krishnamraju Eraparaju
2019-10-02 11:27 ` Bernard Metzler
2019-10-03 10:51 ` Krishnamraju Eraparaju
2019-10-03 14:03 ` Bernard Metzler
2019-10-04 4:57 ` Krishnamraju Eraparaju
2019-10-04 13:47 ` Bernard Metzler [this message]
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=OFBE05CE37.CBF33C8C-ON00258489.004868EE-00258489.004BC858@notes.na.collabserv.com \
--to=bmt@zurich.ibm.com \
--cc=bharat@chelsio.com \
--cc=jgg@ziepe.ca \
--cc=krishna2@chelsio.com \
--cc=linux-rdma@vger.kernel.org \
--cc=nirranjan@chelsio.com \
/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;
as well as URLs for NNTP newsgroup(s).