From: Konstantin Taranov <kotaranov@linux.microsoft.com>
To: kotaranov@microsoft.com, snsanghvi@microsoft.com,
zhiyueqiu@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] RDMA/mana_ib: Enable RDMA devices on the CDX bus
Date: Tue, 3 Nov 2026 03:50:32 -0800 [thread overview]
Message-ID: <20261103115032.736554-1-kotaranov@linux.microsoft.com> (raw)
From: Zhiyue Qiu <zhiyueqiu@microsoft.com>
Enable MANA RDMA on CDX by depending on the shared GDMA core and matching
the CDX auxiliary devices.
Map non-PCI userspace doorbells with pgprot_device() to match the CDX
transport, and report the Microsoft vendor ID directly.
Signed-off-by: Zhiyue Qiu <zhiyueqiu@microsoft.com>
Co-developed-by: Konstantin Taranov <kotaranov@microsoft.com>
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
---
drivers/infiniband/hw/mana/Kconfig | 10 +++++-----
drivers/infiniband/hw/mana/device.c | 2 ++
drivers/infiniband/hw/mana/main.c | 8 +++++---
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/infiniband/hw/mana/Kconfig b/drivers/infiniband/hw/mana/Kconfig
index 546640657..6eae7fa91 100644
--- a/drivers/infiniband/hw/mana/Kconfig
+++ b/drivers/infiniband/hw/mana/Kconfig
@@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0-only
config MANA_INFINIBAND
tristate "Microsoft Azure Network Adapter support"
- depends on NETDEVICES && ETHERNET && PCI && MICROSOFT_MANA
+ depends on NETDEVICES && ETHERNET && MICROSOFT_GDMA_CORE
help
This driver provides low-level RDMA support for Microsoft Azure
- Network Adapter (MANA). MANA supports RDMA features that can be used
- for workloads (e.g. DPDK, MPI etc) that uses RDMA verbs to directly
- access hardware from user-mode processes in Microsoft Azure cloud
- environment.
+ Network Adapter (MANA) on the PCI or CDX bus. MANA supports RDMA
+ features that workloads such as DPDK and MPI can use to directly
+ access hardware from user-mode processes in the Microsoft Azure
+ cloud environment.
diff --git a/drivers/infiniband/hw/mana/device.c b/drivers/infiniband/hw/mana/device.c
index 62c7803ca..33e474907 100644
--- a/drivers/infiniband/hw/mana/device.c
+++ b/drivers/infiniband/hw/mana/device.c
@@ -257,6 +257,8 @@ static void mana_ib_remove(struct auxiliary_device *adev)
static const struct auxiliary_device_id mana_id_table[] = {
{ .name = "mana.rdma", },
{ .name = "mana.eth", },
+ { .name = "mana_cdx.rdma", },
+ { .name = "mana_cdx.eth", },
{},
};
diff --git a/drivers/infiniband/hw/mana/main.c b/drivers/infiniband/hw/mana/main.c
index 858bbc325..c63ac20e7 100644
--- a/drivers/infiniband/hw/mana/main.c
+++ b/drivers/infiniband/hw/mana/main.c
@@ -572,7 +572,10 @@ int mana_ib_mmap(struct ib_ucontext *ibcontext, struct vm_area_struct *vma)
pfn = (gc->phys_db_page_base +
gc->db_page_size * mana_ucontext->doorbell) >>
PAGE_SHIFT;
- prot = pgprot_writecombine(vma->vm_page_prot);
+ if (dev_is_pci(gc->dev))
+ prot = pgprot_writecombine(vma->vm_page_prot);
+ else
+ prot = pgprot_device(vma->vm_page_prot);
ret = rdma_user_mmap_io(ibcontext, vma, pfn, PAGE_SIZE, prot,
NULL);
@@ -623,14 +626,13 @@ int mana_ib_query_device(struct ib_device *ibdev, struct ib_device_attr *props,
struct ib_udata *uhw)
{
struct mana_ib_dev *dev = container_of(ibdev, struct mana_ib_dev, ib_dev);
- struct pci_dev *pdev = to_pci_dev(mdev_to_gc(dev)->dev);
int err;
err = ib_no_udata_io(uhw);
if (err)
return err;
- props->vendor_id = pdev->vendor;
+ props->vendor_id = PCI_VENDOR_ID_MICROSOFT;
props->vendor_part_id = dev->gdma_dev->dev_id.type;
props->max_mr_size = MANA_IB_MAX_MR_SIZE;
props->page_size_cap = dev->adapter_caps.page_size_cap;
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.43.0
reply other threads:[~2026-11-03 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261103115032.736554-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 \
--cc=zhiyueqiu@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 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®