From: sashiko-bot@kernel.org
To: "Quanye Yang" <quanyeyang@proton.me>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] RDMA/rtrs-clt: Fix recv repost to satisfy ib_drain_rq
Date: Mon, 05 Oct 2026 09:10:34 +0000 [thread overview]
Message-ID: <20261005091034.E25B41F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005-rtrs-fix-ib-drain-rq-v2-1-35535a3ed115@proton.me>
> From: Quanye Yang <quanyeyang@proton.me>
>
> On disconnect the client error recovery path calls ib_drain_qp(), which
> requires one free RQ slot and that no recv WQEs are posted while the
> queue is being drained.
>
> When the server is loaded with always_invalidate=N, the path does not
> advertise RTRS_MSG_NEW_RKEY_F. A client-requested invalidation is then
> a standalone SEND_WITH_INV. The recv completion path did not repost
> that WQE; it posted two empty recv WQEs later, when the RDMA-with-IMM
> response carried RTRS_IO_RSP_W_INV_IMM. If the invalidate receive
> never arrived, each such response increased RQ occupancy by one until
> ib_post_recv() started returning -ENOMEM and __ib_drain_rq() failed
> with:
>
> failed to drain recv queue: -12
>
> Repost one empty recv WQE for every receive completion, including
> SEND_WITH_INV completions on the always_invalidate=N path, and only
> while the path is still connected so CQ polling cannot race with
> ib_drain_qp(). Size IO connection RQs to 2 * queue_depth + 1 to match
> the posted recv count and leave the drain slot.
>
> Tested with a synthetic RTRS client flooding unpaired
> RTRS_IO_RSP_W_INV_IMM messages; error recovery no longer triggers
> __ib_drain_rq() warnings.
>
> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
> Signed-off-by: Quanye Yang <quanyeyang@proton.me>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005-rtrs-fix-ib-drain-rq-v2-1-35535a3ed115@proton.me?part=1
prev parent reply other threads:[~2026-10-05 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 9:01 [PATCH v2] RDMA/rtrs-clt: Fix recv repost to satisfy ib_drain_rq Quanye Yang via B4 Relay
2026-10-05 9:10 ` sashiko-bot [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=20261005091034.E25B41F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=quanyeyang@proton.me \
--cc=sashiko-reviews@lists.linux.dev \
/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