All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Taranov <kotaranov@linux.microsoft.com>
To: kotaranov@microsoft.com, snsanghvi@microsoft.com,
	longli@microsoft.com, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH rdma-next v8 0/9] RDMA/mana_ib: Add kernel RC and fast registration support
Date: Tue,  3 Nov 2026 03:17:20 -0800	[thread overview]
Message-ID: <20261103111729.729886-1-kotaranov@linux.microsoft.com> (raw)

From: Konstantin Taranov <kotaranov@microsoft.com>

Add kernel RC QPs and fast-registration MRs to the MANA RDMA driver
for kernel consumers such as NVMe/RDMA and NFS/RDMA.

Implement QP creation and state management, work request posting,
completion processing, and error handling. Use the RDMA core's generic
queue drains for kernel RC QPs, with software-flush notification in the
posting paths. Kernel RC QPs require extended-WQE and power-of-two-SQ
hardware support.

Previous revisions were tested with krping, NVMe/RDMA, and NFS/RDMA,
including RC send and receive error recovery with krping and NVMe/RDMA.

The v7 series also passed 22 NVMe/fio profiles and 20 krping cases on
two MANA VMs. Active-I/O resets and disconnects exercised generic SQ/RQ
drains with softirq, workqueue, and direct-poll CQs. Tracing confirmed
post-marker notifications and completion of all 200 captured drains.

v8:
- Patch 06: Annotate rc_send.immediate and immediate_ext as __le32

v7:
- Patch 09: Include GSI QPs in deferred ERR handling.
- Patch 09: Complete software-flush setup even if the deferred firmware
  ERR request fails. An error CQE guarantees whole-QP DMA shutdown for
  all QP types.
- Drop patch 10 to use the generic SQ/RQ drains for RC.

v6:
- Patch 08: Notify software flushes after posting to error-listed QPs.
  Add reporting pending software flush for IB_CQ_REPORT_MISSED_EVENTS.
- Patch 09: Check fenced WQEs on error cqes to prevent flushing completed WQEs.
  Add mana_ib_cq_clean on QP reset to discard stale CQEs. QID 0 is an invalid
  value for RNIC and safe dor discarding. Add error_pending flag to prevent
  a deffered ERR request to error reset QPs.

v5:
- Patch 01: Reject max_num_sg above MANA_MAX_FMR_PAGES.
- Patch 02: Validate kernel QP queue sizes and SGE limits to prevent
  overflows. Ensure that queue size cannnot be 0.
- Patch 06: Preserve fence flags on unsignaled WQEs. Check message
  length and read sges before posting a wqe.
- Patch 08: Remove the unused QP state field.

v4:
- Patch 01: Use an explicit 64-byte FMR MST alignment
- Patch 02: Validate that the RNIC firmware reports at least two send
  SGEs and subtract the reserved SGE only for RNIC-based mana_ib.
- Patch 07: Add missing wqe_size to shadow wqe for SEND/Write, and
  return a missed-event hint for cached CQEs when CQ is armed

v3:
- Patch 07: Mask arm_psn to 24 bits before ringing the doorbell.
- Patch 08: Exclude userspace QPs from kernel software-state handling
  and CQ error-list insertion, and unlink UC QPs during destruction.

v2:
- Patch 03: Validate fixed-WQE capacity for the header, OOB and SGEs.
- Patch 04: Preserve UC QP modification support.
- Patch 08: Skip software CQ notifications for direct-polling CQs.
- Patch 09: Flush that ERR work during QP teardown.
- Patch 10: Limit drain callbacks to RC QPs and avoid completion
  callbacks for direct-polling CQs.

Konstantin Taranov (9):
  RDMA/mana_ib: Allocate and map fast-registration MRs
  RDMA/mana: Create and destroy kernel RC QPs
  net/mana: Extend GDMA encoding for new RDMA WQEs
  RDMA/mana_ib: Maintain kernel RC QP state
  RDMA/mana_ib: Post receive WRs on kernel RC QPs
  RDMA/mana_ib: Post send and memory-management WRs on RC QPs
  RDMA/mana_ib: Poll RC completions using PSN and FSN progress
  RDMA/mana_ib: Flush and notify CQs when kernel QPs enter ERR
  RDMA/mana_ib: Handle error CQEs for kernel QPs

 drivers/infiniband/hw/mana/cq.c                 | 353 +++++++++++++++++--
 drivers/infiniband/hw/mana/device.c             |   2 +
 drivers/infiniband/hw/mana/main.c               |  15 +-
 drivers/infiniband/hw/mana/mana_ib.h            | 139 +++++++-
 drivers/infiniband/hw/mana/mr.c                 |  87 ++++-
 drivers/infiniband/hw/mana/qp.c                 | 327 ++++++++++++++++--
 drivers/infiniband/hw/mana/shadow_queue.h       |  22 ++
 drivers/infiniband/hw/mana/wr.c                 | 433 +++++++++++++++++++++++-
 drivers/net/ethernet/microsoft/mana/gdma_main.c |  55 ++-
 include/net/mana/gdma.h                         |  38 ++-
 10 files changed, 1402 insertions(+), 69 deletions(-)

-- 
2.43.0

             reply	other threads:[~2026-11-03 11:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 11:17 Konstantin Taranov [this message]
2026-11-03 11:17 ` [PATCH rdma-next v8 1/9] RDMA/mana_ib: Allocate and map fast-registration MRs Konstantin Taranov
2026-11-03 11:24   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 2/9] RDMA/mana: Create and destroy kernel RC QPs Konstantin Taranov
2026-11-03 11:29   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 3/9] net/mana: Extend GDMA encoding for new RDMA WQEs Konstantin Taranov
2026-11-03 11:27   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 4/9] RDMA/mana_ib: Maintain kernel RC QP state Konstantin Taranov
2026-11-03 11:26   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 5/9] RDMA/mana_ib: Post receive WRs on kernel RC QPs Konstantin Taranov
2026-11-03 11:25   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 6/9] RDMA/mana_ib: Post send and memory-management WRs on " Konstantin Taranov
2026-11-03 11:37   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 7/9] RDMA/mana_ib: Poll RC completions using PSN and FSN progress Konstantin Taranov
2026-11-03 11:42   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 8/9] RDMA/mana_ib: Flush and notify CQs when kernel QPs enter ERR Konstantin Taranov
2026-11-03 11:33   ` sashiko-bot
2026-11-03 11:17 ` [PATCH rdma-next v8 9/9] RDMA/mana_ib: Handle error CQEs for kernel QPs Konstantin Taranov
2026-11-03 11:38   ` 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=20261103111729.729886-1-kotaranov@linux.microsoft.com \
    --to=kotaranov@linux.microsoft.com \
    --cc=jgg@ziepe.ca \
    --cc=kotaranov@microsoft.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=snsanghvi@microsoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.