From: maxg@mellanox.com (Max Gurtovoy)
Subject: [PATCH 0/4] Last WQE Reached event treatment
Date: Wed, 17 Jan 2018 15:52:54 +0200 [thread overview]
Message-ID: <1516197178-26493-1-git-send-email-maxg@mellanox.com> (raw)
From: root <root@rsws50.mtr.labs.mlnx>
This series adds a new API to support a drain of a QP that is
associated with a SRQ (Shared Receive Queue).
Leakage problem can occur if we won't treat Last WQE Reached event:
1. QP may have consumed SRQ WQE, but no CQE received yet (especially
in error flow that can take long time)
2. polling responder CQ at this stage is meaningless (since CQEs
haven't been posted)
3. destroying QP at this point will cause SRQ credit leakage
So the solution (according to IB spec):
1. modify QP to err state
2. wait for Last WQE Reached event
3. poll CQ to free SRQ WQEs completions
4. destroy the QP.
In the series, I based on earlier patchset that enables
direct polling the CQ regardless of the type.
I've added support for ULPs: NVMe-oF, iSER and SRP as well.
Max Gurtovoy (4):
IB/core: add support for draining Shared receive queues
nvmet-rdma: notify QP on Last WQE Reached event arrival
iser-target: remove dead code
IB/srpt: notify QP on Last WQE Reached event arrival
drivers/infiniband/core/verbs.c | 69 ++++++++++++++++++++++++++++++++-
drivers/infiniband/ulp/isert/ib_isert.c | 3 --
drivers/infiniband/ulp/srpt/ib_srpt.c | 1 +
drivers/nvme/target/rdma.c | 3 ++
include/rdma/ib_verbs.h | 8 ++++
5 files changed, 80 insertions(+), 4 deletions(-)
--
1.8.3.1
next reply other threads:[~2018-01-17 13:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 13:52 Max Gurtovoy [this message]
2018-01-17 13:52 ` [PATCH 1/4] IB/core: add support for draining Shared receive queues Max Gurtovoy
2018-01-17 15:35 ` Steve Wise
2018-01-18 18:06 ` Bart Van Assche
2018-01-17 16:11 ` Bart Van Assche
2018-01-18 10:31 ` Max Gurtovoy
2018-01-24 6:39 ` Sagi Grimberg
2018-01-24 10:20 ` Max Gurtovoy
2018-01-17 13:52 ` [PATCH 2/4] nvmet-rdma: notify QP on Last WQE Reached event arrival Max Gurtovoy
2018-01-17 15:37 ` Steve Wise
2018-01-18 18:04 ` Bart Van Assche
2018-01-17 13:52 ` [PATCH 3/4] iser-target: remove dead code Max Gurtovoy
2018-01-17 13:52 ` [PATCH 4/4] IB/srpt: notify QP on Last WQE Reached event arrival Max Gurtovoy
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=1516197178-26493-1-git-send-email-maxg@mellanox.com \
--to=maxg@mellanox.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