linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krishnamraju Eraparaju <krishna2@chelsio.com>
To: Bernard Metzler <BMT@zurich.ibm.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: [PATCH for-next] RDMA/siw: fix SQ/RQ drain logic to support ib_drain_qp
Date: Fri, 4 Oct 2019 10:27:20 +0530	[thread overview]
Message-ID: <20191004045718.GA29290@chelsio.com> (raw)
In-Reply-To: <OF2EDF2738.25C83B56-ON00258488.003E6ADE-00258488.004D3019@notes.na.collabserv.com>

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.
 */


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.

Thanks,
Krishna.

  reply	other threads:[~2019-10-04  4:57 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 [this message]
2019-10-04 13:47                 ` Bernard Metzler

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=20191004045718.GA29290@chelsio.com \
    --to=krishna2@chelsio.com \
    --cc=BMT@zurich.ibm.com \
    --cc=bharat@chelsio.com \
    --cc=jgg@ziepe.ca \
    --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).