From: Leon Romanovsky <leon@kernel.org>
To: Bart Van Assche <bvanassche@acm.org>,
Jason Gunthorpe <jgg@ziepe.ca>,
Praneeth Balasubramanian <praneethb2002@gmail.com>
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
Praneeth Balasubramanian <praneeth@ucsb.edu>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/srp: Reserve send queue and CQ space for ib_drain_qp()
Date: Thu, 26 Nov 2026 13:53:00 -0500 [thread overview]
Message-ID: <179571918019.1293210.177305723817097808.b4-ty@kernel.org> (raw)
In-Reply-To: <20261126002227.3598226-1-praneethb2002@gmail.com>
On Wed, 25 Nov 2026 16:22:27 -0800, 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. The send queue and send
> CQ hold exactly m * queue_size entries, which is the most work requests
> SRP can have outstanding. If the channel is torn down while the send
> queue is full, for example during error handling after a target stops
> responding, posting the drain work request can fail with "failed to
> drain send queue", or its completion can find the CQ full. The QP is
> then destroyed without the guarantee that ib_drain_qp() is meant to
> provide.
>
> [...]
Applied, thanks!
[1/1] RDMA/srp: Reserve send queue and CQ space for ib_drain_qp()
https://git.kernel.org/rdma/rdma/c/2e869a30085ec1
Best regards,
--
Leon Romanovsky <leon@kernel.org>
prev parent reply other threads:[~2026-11-26 18:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 22:24 [PATCH] " Praneeth Balasubramanian
2026-11-11 0:44 ` Bart Van Assche
2026-11-26 0:22 ` [PATCH v2] " Praneeth Balasubramanian
2026-11-26 18:53 ` Leon Romanovsky [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=179571918019.1293210.177305723817097808.b4-ty@kernel.org \
--to=leon@kernel.org \
--cc=bvanassche@acm.org \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=praneeth@ucsb.edu \
--cc=praneethb2002@gmail.com \
--cc=stable@vger.kernel.org \
/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®