From: Bart Van Assche <bvanassche@acm.org>
To: Praneeth Balasubramanian <praneethb2002@gmail.com>,
Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Praneeth Balasubramanian <praneeth@ucsb.edu>
Subject: Re: [PATCH] RDMA/srp: Reserve send queue and CQ space for ib_drain_qp()
Date: Tue, 10 Nov 2026 16:44:13 -0800 [thread overview]
Message-ID: <70bd9162-e9f9-4580-bfb5-cc29107a4126@acm.org> (raw)
In-Reply-To: <20261110222421.205573-1-praneeth@ucsb.edu>
On 11/10/26 2:24 PM, Praneeth Balasubramanian wrote:
> srp_destroy_qp() calls ib_drain_qp(), which also drains the send queue.
> ib_drain_sq() requires the caller to "ensure there is room in the CQ and
> SQ for the drain work request and completion".
>
> SRP reserves that room on the receive side, where the queue and CQ have
> queue_size + 1 entries. Commit 9294000d6d89 ("IB/srp: Drain the send
> queue before destroying a QP") switched from ib_drain_rq() to
> ib_drain_qp() but did not grow the send side.
Agreed. srp_destroy_qp() reaps the send CQ before it calls
ib_drain_qp(). After the QP has been moved into the error state, up to
m * queue_size flushed work requests may complete on the send CQ, and
the drain work request needs a free send queue slot. Hence, both the
send queue and the send CQ need one additional entry.
> Signed-off-by: Praneeth Balasubramanian <praneeth@ucsb.edu>
The From: header of this email is praneethb2002@gmail.com while the
Signed-off-by: tag uses praneeth@ucsb.edu. If this patch is applied
as-is, the gmail address will be recorded as the author. Please either
add an in-body "From: Praneeth Balasubramanian <praneeth@ucsb.edu>" line
when reposting or make sure that both addresses match.
With that addressed:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
prev parent reply other threads:[~2026-11-11 0:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 22:24 Praneeth Balasubramanian
2026-11-11 0:44 ` Bart Van Assche [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=70bd9162-e9f9-4580-bfb5-cc29107a4126@acm.org \
--to=bvanassche@acm.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=praneeth@ucsb.edu \
--cc=praneethb2002@gmail.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
all inboxes | Powered by JetHome®