Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Konstantin Taranov" <kotaranov@linux.microsoft.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v4 07/10] RDMA/mana_ib: Poll RC completions using PSN and FSN progress
Date: Sat, 10 Oct 2026 07:11:59 +0000	[thread overview]
Message-ID: <sashiko-outbox-166303@kernel.org> (raw)
In-Reply-To: <20261010065443.3554193-8-kotaranov@linux.microsoft.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] rdma/mana_ib: unsignaled SQ WQEs drop cross-queue FENCE flags
--

commit f52d44bbe1b3dcdecb4068d26d5596db440b5069
Author: Konstantin Taranov <kotaranov@microsoft.com>
Subject: RDMA/mana_ib: Poll RC completions using PSN and FSN progress

This commit introduces decoding for RC receive completions, armed-PSN
notifications, and MMQ completions. It retires requester and MMQ shadow
entries using sequence numbers and enforces cross-queue fence dependencies.

> diff --git a/drivers/infiniband/hw/mana/wr.c b/drivers/infiniband/hw/mana/wr.c
> index 6cc67537c6557..9fff8622aee22 100644
> --- a/drivers/infiniband/hw/mana/wr.c
> +++ b/drivers/infiniband/hw/mana/wr.c
> @@ -408,6 +408,9 @@ static int mana_ib_post_sq(struct mana_ib_qp *qp, const struct ib_send_wr *wr)
>  	if (err)
>  		return err;
>  
> +	if (wr->opcode != IB_WR_RDMA_READ)
> +		shadow_wqe->wqe_size_in_bu = wqe_info.wqe_size_in_bu;
> +
>  	shadow_wqe->wr_id = wr->wr_id;
>  	shadow_wqe->send_opcode = convert_wr_to_wc(wr->opcode);
>  	if (!signaled)

[Severity: High]
Does the logic immediately following this diff permanently drop the
MANA_WQ_FENCE_WC flag for unsignaled WQEs?

Looking at mana_ib_post_sq():

	if (!signaled)
		shadow_wqe->flags |= MANA_WQ_NO_SIGNAL_WC;
	else if ((wr->send_flags & IB_SEND_FENCE) || qp->pending_mmq_fence)
		shadow_wqe->flags |= MANA_WQ_FENCE_WC;

If a work request is unsignaled and requires a fence, the first branch
is taken, bypassing the fence branch entirely.

This appears to break cross-queue retirement dependencies and could
potentially leak unsignaled MMQ WQEs in the shadow queue.

Should this be changed to two separate 'if' statements so that both
MANA_WQ_NO_SIGNAL_WC and MANA_WQ_FENCE_WC can be set on the same shadow WQE?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261010065443.3554193-1-kotaranov@linux.microsoft.com?part=7

  reply	other threads:[~2026-10-10  7:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-10  6:54 [PATCH rdma-next v4 00/10] RDMA/mana_ib: Add kernel RC and fast registration support Konstantin Taranov
2026-10-10  6:54 ` [PATCH rdma-next v4 01/10] RDMA/mana_ib: Allocate and map fast-registration MRs Konstantin Taranov
2026-10-10  7:07   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 02/10] RDMA/mana: Create and destroy kernel RC QPs Konstantin Taranov
2026-10-10  7:11   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 03/10] net/mana: Extend GDMA encoding for new RDMA WQEs Konstantin Taranov
2026-10-10  7:11   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 04/10] RDMA/mana_ib: Maintain kernel RC QP state Konstantin Taranov
2026-10-10  7:13   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 05/10] RDMA/mana_ib: Post receive WRs on kernel RC QPs Konstantin Taranov
2026-10-10  7:08   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 06/10] RDMA/mana_ib: Post send and memory-management WRs on " Konstantin Taranov
2026-10-10  7:15   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 07/10] RDMA/mana_ib: Poll RC completions using PSN and FSN progress Konstantin Taranov
2026-10-10  7:11   ` sashiko-bot [this message]
2026-10-10  6:54 ` [PATCH rdma-next v4 08/10] RDMA/mana_ib: Flush and notify CQs when kernel QPs enter ERR Konstantin Taranov
2026-10-10  7:15   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 09/10] RDMA/mana_ib: Handle error CQEs for RC QPs Konstantin Taranov
2026-10-10  7:11   ` sashiko-bot
2026-10-10  6:54 ` [PATCH rdma-next v4 10/10] RDMA/mana_ib: Drain kernel receive and send queues Konstantin Taranov
2026-10-10  7:13   ` sashiko-bot

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=sashiko-outbox-166303@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kotaranov@linux.microsoft.com \
    --cc=linux-rdma@vger.kernel.org \
    --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