Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Quanye Yang" <quanyeyang@proton.me>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH] RDMA/rtrs-clt: Fix recv repost to satisfy ib_drain_rq
Date: Mon, 21 Sep 2026 14:14:09 +0000	[thread overview]
Message-ID: <20260921141410.0B6281F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260921-rtrs-fix-ib-drain-rq-v1-1-11b1637958ba@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.
> 
> The legacy recv completion path deferred reposting invalidate receives
> and instead posted two empty recv WQEs when handling RDMA-with-IMM
> responses marked with invalidation.  If an 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 legacy
> SEND_WITH_INV invalidates, 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/20260921-rtrs-fix-ib-drain-rq-v1-1-11b1637958ba@proton.me?part=1


  reply	other threads:[~2026-09-21 14:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 14:04 [PATCH] RDMA/rtrs-clt: Fix recv repost to satisfy ib_drain_rq Quanye Yang via B4 Relay
2026-09-21 14:14 ` sashiko-bot [this message]
2026-09-28 19:18 ` Leon Romanovsky
2026-09-29  7:20   ` Jinpu Wang
2026-10-05  4:57     ` Jinpu Wang

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=20260921141410.0B6281F000FF@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