* [PATCH rdma-next] RDMA/mana_ib: Enable RDMA devices on the CDX bus
@ 2026-11-03 11:50 Konstantin Taranov
0 siblings, 0 replies; only message in thread
From: Konstantin Taranov @ 2026-11-03 11:50 UTC (permalink / raw)
To: kotaranov, snsanghvi, zhiyueqiu, longli, jgg, leon
Cc: linux-rdma, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 11:50 [PATCH rdma-next] RDMA/mana_ib: Enable RDMA devices on the CDX bus Konstantin Taranov
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®