[PATCH rdma v8 0/7] Add ZTE DingHai Ethernet Protocol Driver for RDMA

From: Yanze Zhang

Date: Mon Nov 02 2026 - 03:34:33 EST


Hi,

This is v8 of the ZTE DingHai (ZXDH) RDMA driver, providing RoCEv2
support for ZTE DingHai network adapters.

The DingHai Ethernet PF driver this RDMA driver attaches to is being
merged through net-next. The first batch, which introduces the DINGHAI
Kconfig symbol and the "dinghai10e" PF driver, is already in net-next
[1]; the second batch is still under review [2]. The auxiliary device
that this driver binds to is created by a patch that is still being
prepared and has not been posted yet; this series is therefore posted
for review ahead of that patch, and the driver will not probe on the
upstream baseline until it lands. This series is based on an
rdma/for-next baseline that already contains the first batch, so
"depends on DINGHAI" resolves. The driver registers as an auxiliary
driver and matches the auxiliary device by name only, so it cannot bind
to an unrelated PCI function.

This series covers the registration of the device, the device and the
port queries, the user context, the protection domains and the mapping
of the doorbell areas. The queue pair and completion queue data path is
not part of it and follows separately. Protection domains that the
kernel allocates are not supported either, because the driver does not
provide the memory registration of the core yet.

v8 folds the review feedback on v7 [3] back into the patch that
introduced the affected code: the 8K index counter array is released
with a cleared pointer on the probe error path, the number of completion
vectors is no longer reported as zero, the driver info is read with the
rtnl lock held unconditionally, the unused handler and name lists are
gone, and the device and port query operations moved ahead of the probe
path, because ib_register_device() calls the query callbacks without
checking them for NULL.

Testing in this version focuses on the review fixes: the driver builds,
probes on DingHai hardware, and 'rdma link' / 'ibv_devinfo' enumerate
the device. The hardware testing was done with a PF driver that already
creates the auxiliary device, because the baseline that this series is
based on only has the first batch, which does not create it yet. The
build was tested with CONFIG_DINGHAI=y, because the Kconfig depends on
it, and every commit of the series was built on its own to make sure
that the series stays bisectable. Perftest (QP/CQ/MR creation and the
data path) is covered by the parallel network driver series, so we did
not want to hold these review fixes on it. Functional verbs testing
will be reported once both series are merged.

Two items raised in review are deliberately left out because they
need input we do not have yet:

- The common_func() opcode for the IRQ capability query: needs
confirmation against the firmware interface document; the current
opcode works on the tested firmware.
- The shutdown-vs-quiesce semantics and the doorbell isolation
mechanism: these need the hardware team's confirmation.

Two other points are noted for completeness. An __iomem annotation on
mem_rsrc is moot, since it is plain vzalloc'd memory rather than a BAR
mapping. Replacing the resource bitmaps with XArray/IDA is a cleanup
that does not change behaviour and will follow separately. Neither of
them affects probe/remove or the verbs that are implemented here.

[1] https://lore.kernel.org/netdev/178598040988.599522.8462097247667886071.git-patchwork-notify@xxxxxxxxxx/
[2] https://lore.kernel.org/netdev/20261014151200489685SCIlolykW0NGfL5EtQ@xxxxxxxxxx/
[3] https://lore.kernel.org/linux-rdma/20261027021119.2325798-1-zhang.yanze@xxxxxxxxxx/

Yanze Zhang (7):
RDMA/zrdma: Add build infrastructure and module skeleton
RDMA/zrdma: Add core data structures and ABI definitions
RDMA/zrdma: Add internal headers and hardware register definitions
RDMA/zrdma: Add hardware resource initialization and verbs skeleton
RDMA/zrdma: Implement device and port query operations
RDMA/zrdma: Add device probe and remove logic
RDMA/zrdma: Implement context, PD, and mmap operations

MAINTAINERS | 6 +
drivers/infiniband/Kconfig | 1 +
drivers/infiniband/hw/Makefile | 1 +
drivers/infiniband/hw/zrdma/Kconfig | 11 +
drivers/infiniband/hw/zrdma/Makefile | 7 +
drivers/infiniband/hw/zrdma/zrdma_ctrl.h | 20 +
drivers/infiniband/hw/zrdma/zrdma_defs.h | 19 +
drivers/infiniband/hw/zrdma/zrdma_hw.c | 129 ++++
drivers/infiniband/hw/zrdma/zrdma_hw.h | 21 +
drivers/infiniband/hw/zrdma/zrdma_main.c | 217 +++++++
drivers/infiniband/hw/zrdma/zrdma_main.h | 211 +++++++
drivers/infiniband/hw/zrdma/zrdma_type.h | 92 +++
drivers/infiniband/hw/zrdma/zrdma_verbs.c | 735 ++++++++++++++++++++++
drivers/infiniband/hw/zrdma/zrdma_verbs.h | 134 ++++
include/uapi/rdma/ib_user_ioctl_verbs.h | 1 +
include/uapi/rdma/zrdma_abi.h | 114 ++++
16 files changed, 1719 insertions(+)
create mode 100644 drivers/infiniband/hw/zrdma/Kconfig
create mode 100644 drivers/infiniband/hw/zrdma/Makefile
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_ctrl.h
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_defs.h
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_hw.c
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_hw.h
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_main.c
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_main.h
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_type.h
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_verbs.c
create mode 100644 drivers/infiniband/hw/zrdma/zrdma_verbs.h
create mode 100644 include/uapi/rdma/zrdma_abi.h

--
2.43.5