linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bernard Metzler" <BMT@zurich.ibm.com>
To: "Leon Romanovsky" <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org, bharat@chelsio.com, jgg@ziepe.ca,
	nirranjan@chelsio.com, krishna2@chelsio.com, bvanassche@acm.org
Subject: RE: [[PATCH v2 for-next]] RDMA/siw: Fix SQ/RQ drain logic
Date: Wed, 2 Oct 2019 14:38:26 +0000	[thread overview]
Message-ID: <OF0EB68DD7.BD098844-ON00258487.005068D7-00258487.00506C97@notes.na.collabserv.com> (raw)
In-Reply-To: <20191002133210.GD5855@unreal>

-----"Leon Romanovsky" <leon@kernel.org> wrote: -----

>To: "Bernard Metzler" <bmt@zurich.ibm.com>
>From: "Leon Romanovsky" <leon@kernel.org>
>Date: 10/02/2019 03:32PM
>Cc: linux-rdma@vger.kernel.org, bharat@chelsio.com, jgg@ziepe.ca,
>nirranjan@chelsio.com, krishna2@chelsio.com, bvanassche@acm.org
>Subject: [EXTERNAL] Re: [[PATCH v2 for-next]] RDMA/siw: Fix SQ/RQ
>drain logic
>
>On Wed, Oct 02, 2019 at 03:14:23PM +0200, Bernard Metzler wrote:
>> Storage ULPs (e.g. iSER & NVMeOF) use ib_drain_qp() to
>> drain QP/CQ. Current SIW's own drain routines do not properly
>> wait until all SQ/RQ elements are completed and reaped
>> from the CQ. This may cause touch after free issues.
>> New logic relies on generic __ib_drain_sq()/__ib_drain_rq()
>> posting a final work request, which SIW immediately flushes
>> to CQ.
>>
>> Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
>> Signed-off-by: Krishnamraju Eraparaju <krishna2@chelsio.com>
>> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com>
>> ---
>>  drivers/infiniband/sw/siw/siw_main.c  |  20 -----
>>  drivers/infiniband/sw/siw/siw_verbs.c | 103
>+++++++++++++++++++++-----
>>  2 files changed, 86 insertions(+), 37 deletions(-)
>>
>
>I didn't follow after v1 discussion and will be glad to see
>changelog,
>what is the reason for v2?
>
Absolutely. Let me resend the patch with below change log.

Sorry & best regards,
Bernard.

v1 -> v2:
- Accept SQ and RQ work requests, if QP is in ERROR
  state. In that case, immediately flush WR's to CQ.
  This already provides needed functionality to
  support ib_drain_sq()/ib_drain_rq() without extra
  state checking in the fast path.


  parent reply	other threads:[~2019-10-02 14:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 13:14 [[PATCH v2 for-next]] RDMA/siw: Fix SQ/RQ drain logic Bernard Metzler
2019-10-02 13:32 ` Leon Romanovsky
2019-10-02 14:38 ` Bernard Metzler [this message]
2019-10-02 14:38 Bernard Metzler
2019-10-02 15:47 ` Leon Romanovsky

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=OF0EB68DD7.BD098844-ON00258487.005068D7-00258487.00506C97@notes.na.collabserv.com \
    --to=bmt@zurich.ibm.com \
    --cc=bharat@chelsio.com \
    --cc=bvanassche@acm.org \
    --cc=jgg@ziepe.ca \
    --cc=krishna2@chelsio.com \
    --cc=leon@kernel.org \
    --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).