[PATCH rdma v5 0/7] Add ZTE DingHai Ethernet Protocol Driver for RDMA
From: Yanze Zhang
Date: Tue Aug 11 2026 - 05:53:27 EST
Hi Maintainers and Reviewers,
This is v5 of the ZTE DingHai (ZXDH) RDMA driver submission.
Thank you Leon Romanovsky, Zhu Yanjun, Julian Braha, and the kernel test
robot for their valuable feedback on previous versions.
The driver provides RoCEv2 support for ZTE DingHai network adapters. It
has been successfully tested with user-space utilities including 'rdma
link' and 'ibv_devinfo', confirming proper device registration and
attribute querying.
Note on Dependencies:
The corresponding ZTE DingHai Ethernet network driver is being submitted
to the Linux networking community in parallel [1]. Once merged, we will
update the Kconfig dependencies to explicitly require it. For now, the
driver relies on generic NETDEVICES and PCI subsystems.
Major changes in v5 compared to v4:
1. Granular Patch Splitting (< 300 lines each):
- As requested by Leon Romanovsky, the driver has been split into 7
smaller, logically independent patches to simplify review.
- Each patch is strictly under 300 lines and independently compilable.
2. Functional Driver ID & Early Registration:
- Added RDMA_DRIVER_ZRDMA to UAPI in Patch 1.
- Implemented a minimal verbs skeleton in Patch 4, ensuring the driver
registers with a valid driver_id and loads without errors, satisfying
the requirement that "the driver must be functional".
3. Kconfig & Build System Improvements (Suggested by Zhu Yanjun):
- Added explicit dependencies: depends on PCI, NETDEVICES.
- Added proper selection: select AUXILIARY_BUS to ensure the auxiliary
bus subsystem is enabled when this driver is selected.
4. Code Quality & Style Fixes:
- Fixed build error for incomplete type 'struct msix_entry' by including
<linux/msi.h> (Reported-by: kernel test robot).
- Removed unused defines, functions, and dead code paths.
- Ensured all new files follow Linux kernel coding style (checked with
checkpatch.pl --strict).
Changes in v4:
- Fixed Kconfig help text indentation (Julian Braha).
- Self-correction: Updated SPDX license tag and fixed Makefile
indentation to strictly follow subsystem standards.
Changes in v3:
- Fixed missing handle release in zxdh_remove() as pointed out by Junxian
on v1.
- Removed outdated reference to "auxiliary bus following hns pattern" from
cover letter description.
- Addressed Junxian's indentation concern on v1: verified code against
checkpatch.pl --strict and confirmed 8-character indentation is used
throughout.
Changes in v2:
- Removed redundant 'depends on INFINIBAND' from Kconfig as it is already
wrapped by the parent if-block (Julian Braha, v1 review).
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: Add device probe and remove logic
RDMA/zrdma: Implement context, PD, and mmap operations
RDMA/zrdma: Implement device and port query operations
MAINTAINERS | 6 +
drivers/infiniband/Kconfig | 1 +
drivers/infiniband/hw/Makefile | 1 +
drivers/infiniband/hw/zrdma/Kconfig | 12 +
drivers/infiniband/hw/zrdma/Makefile | 7 +
drivers/infiniband/hw/zrdma/zrdma_abi.h | 78 +++
drivers/infiniband/hw/zrdma/zrdma_ctrl.h | 22 +
drivers/infiniband/hw/zrdma/zrdma_defs.h | 19 +
drivers/infiniband/hw/zrdma/zrdma_hw.c | 103 ++++
drivers/infiniband/hw/zrdma/zrdma_hw.h | 21 +
drivers/infiniband/hw/zrdma/zrdma_main.c | 282 +++++++++
drivers/infiniband/hw/zrdma/zrdma_main.h | 214 +++++++
drivers/infiniband/hw/zrdma/zrdma_type.h | 85 +++
drivers/infiniband/hw/zrdma/zrdma_verbs.c | 714 ++++++++++++++++++++++
drivers/infiniband/hw/zrdma/zrdma_verbs.h | 128 ++++
include/uapi/rdma/ib_user_ioctl_verbs.h | 1 +
16 files changed, 1694 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_abi.h
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
Links:
[1] https://lore.kernel.org/netdev/178598040988.599522.8462097247667886071.git-patchwork-notify@xxxxxxxxxx/
base-commit: <a12d9145145b21c50531afb6e3f711b1f34e1465>
--
2.27.0