[PATCH for-next 00/23] Migrate to hfi2 driver

Dennis Dalessandro
2025-06-30T17:58:14Z

While sharing similar bones the chip for the Cornelis Networks next
generation fabric technology has some fundamental differences that
resulted in a near complete re-write of the driver. It also does not use
the private Cdev interface that the hfi1 driver exposes. After mentioning
this in an offlist email thread with the RDMA maintainers we have decided
to go with the approach of moving to a new driver and declaring hfi1
obsolete.

It is desirable to keep hfi1 around temporarily to let user APIs catch up
to support access through the uverbs device rather than the private hfi1
Cdev.

This driver is designed to support future products as well.

Included in this submission is a couple patches to rdmavt and the IB core
to allow writev access to the uverbs device.

We are also removing the opa_vnic driver and associated collateral as it
has no future and has just been languishing in the tree for some time.

This series will be followed up to pick up any changes from hfi1 that
were not yet incorporated in our internal development tree.

Depending on how the review of this code goes we will either submit
separately or as a v2 to this series.

We are also open to other ideas on how to submit this and make it more
consumable for review and feedback.

---

Dean Luick (5):
RDMA/OPA: Update OPA link speed list
RDMA/rdmavt: Add ucontext alloc/dealloc passthrough
RDMA/rdmavt: Correct multi-port QP iteration
RDMA/rdmavt: Add driver mmap callback
RDMA/core: Add writev to uverbs file descriptor

Dennis Dalessandro (18):
RDMA/hfi1: Remove opa_vnic
RDMA/hfi2: Consolidate ABI files and setup uverbs access
RDMA/hfi2: Start hfi2 driver by basing off of hfi1
RDMA/hfi2: Add in HW register definition files
RDMA/hfi2: Add in HW register access support
RDMA/hfi2: Add in trace header files
RDMA/hfi2: Add in trace support
RDMA/hfi2: Add system core header files
RDMA/hfi2: Add system core support
RDMA/hfi2: Add in MAD handling related headers
RDMA/hfi2: Implement MAD handling
RDMA/hfi2: Add IO related headers
RDMA/hfi2: Implement data moving infrastructure
RDMA/hfi2: Add in support for verbs
RDMA/hfi2: Support ipoib
RDMA/hfi2: Add misc header files
RDMA/hfi2: Add the rest of the driver
RDMA/hfi2: Make it build

Documentation/infiniband/opa_vnic.rst | 159 -
.../zh_CN/infiniband/opa_vnic.rst | 156 -
MAINTAINERS | 14 +-
drivers/infiniband/Kconfig | 3 +-
drivers/infiniband/core/device.c | 1 +
drivers/infiniband/core/uverbs_main.c | 22 +
drivers/infiniband/hw/hfi1/Makefile | 4 +-
drivers/infiniband/hw/hfi1/aspm.c | 2 +-
drivers/infiniband/hw/hfi1/chip.c | 54 +-
drivers/infiniband/hw/hfi1/chip.h | 2 -
drivers/infiniband/hw/hfi1/driver.c | 13 +-
drivers/infiniband/hw/hfi1/file_ops.c | 2 +-
drivers/infiniband/hw/hfi1/hfi.h | 20 -
drivers/infiniband/hw/hfi1/init.c | 4 +-
drivers/infiniband/hw/hfi1/mad.c | 1 -
drivers/infiniband/hw/hfi1/msix.c | 4 +-
drivers/infiniband/hw/hfi1/netdev.h | 8 +-
drivers/infiniband/hw/hfi1/netdev_rx.c | 3 +-
drivers/infiniband/hw/hfi1/trace_ctxts.h | 2 +-
drivers/infiniband/hw/hfi1/verbs.c | 2 -
drivers/infiniband/hw/hfi1/vnic.h | 126 -
drivers/infiniband/hw/hfi1/vnic_main.c | 615 -
drivers/infiniband/hw/hfi1/vnic_sdma.c | 282 -
drivers/infiniband/hw/hfi2/Kconfig | 23 +
drivers/infiniband/hw/hfi2/Makefile | 69 +
drivers/infiniband/hw/hfi2/affinity.c | 1173 ++
drivers/infiniband/hw/hfi2/affinity.h | 85 +
drivers/infiniband/hw/hfi2/aspm.c | 291 +
drivers/infiniband/hw/hfi2/aspm.h | 35 +
drivers/infiniband/hw/hfi2/chip.c | 16345 ++++++++++++++++
drivers/infiniband/hw/hfi2/chip.h | 1420 ++
drivers/infiniband/hw/hfi2/chip_gen.c | 504 +
drivers/infiniband/hw/hfi2/chip_gen.h | 29 +
drivers/infiniband/hw/hfi2/chip_jkr.c | 873 +
drivers/infiniband/hw/hfi2/chip_jkr.h | 119 +
drivers/infiniband/hw/hfi2/chip_registers.h | 1297 ++
.../infiniband/hw/hfi2/chip_registers_jkr.h | 224 +
drivers/infiniband/hw/hfi2/common.h | 335 +
drivers/infiniband/hw/hfi2/cport.c | 746 +
drivers/infiniband/hw/hfi2/cport.h | 247 +
drivers/infiniband/hw/hfi2/cport_traps.h | 43 +
drivers/infiniband/hw/hfi2/debugfs.c | 1578 ++
drivers/infiniband/hw/hfi2/debugfs.h | 70 +
drivers/infiniband/hw/hfi2/device.h | 18 +
drivers/infiniband/hw/hfi2/driver.c | 1959 ++
drivers/infiniband/hw/hfi2/efivar.c | 138 +
drivers/infiniband/hw/hfi2/efivar.h | 16 +
drivers/infiniband/hw/hfi2/eprom.c | 450 +
drivers/infiniband/hw/hfi2/eprom.h | 10 +
drivers/infiniband/hw/hfi2/exp_rcv.c | 78 +
drivers/infiniband/hw/hfi2/exp_rcv.h | 156 +
drivers/infiniband/hw/hfi2/fault.c | 335 +
drivers/infiniband/hw/hfi2/fault.h | 69 +
drivers/infiniband/hw/hfi2/file_ops.c | 1272 ++
drivers/infiniband/hw/hfi2/file_ops.h | 46 +
drivers/infiniband/hw/hfi2/firmware.c | 2266 +++
drivers/infiniband/hw/hfi2/hfi2.h | 3283 ++++
drivers/infiniband/hw/hfi2/init.c | 2729 +++
drivers/infiniband/hw/hfi2/intr.c | 296 +
drivers/infiniband/hw/hfi2/iowait.c | 128 +
drivers/infiniband/hw/hfi2/iowait.h | 457 +
drivers/infiniband/hw/hfi2/ipoib.h | 172 +
drivers/infiniband/hw/hfi2/ipoib_main.c | 253 +
drivers/infiniband/hw/hfi2/ipoib_rx.c | 92 +
drivers/infiniband/hw/hfi2/ipoib_tx.c | 871 +
drivers/infiniband/hw/hfi2/mad.c | 6055 ++++++
drivers/infiniband/hw/hfi2/mad.h | 448 +
drivers/infiniband/hw/hfi2/mmu_rb.c | 334 +
drivers/infiniband/hw/hfi2/mmu_rb.h | 77 +
drivers/infiniband/hw/hfi2/msix.c | 411 +
drivers/infiniband/hw/hfi2/msix.h | 26 +
drivers/infiniband/hw/hfi2/netdev.h | 99 +
drivers/infiniband/hw/hfi2/netdev_rx.c | 494 +
drivers/infiniband/hw/hfi2/opa_compat.h | 86 +
drivers/infiniband/hw/hfi2/opfn.c | 323 +
drivers/infiniband/hw/hfi2/opfn.h | 87 +
drivers/infiniband/hw/hfi2/pcie.c | 1380 ++
drivers/infiniband/hw/hfi2/pin_system.c | 550 +
drivers/infiniband/hw/hfi2/pinning.c | 66 +
drivers/infiniband/hw/hfi2/pinning.h | 74 +
drivers/infiniband/hw/hfi2/pio.c | 2277 +++
drivers/infiniband/hw/hfi2/pio.h | 305 +
drivers/infiniband/hw/hfi2/pio_copy.c | 715 +
drivers/infiniband/hw/hfi2/platform.c | 1035 +
drivers/infiniband/hw/hfi2/platform.h | 371 +
drivers/infiniband/hw/hfi2/qp.c | 949 +
drivers/infiniband/hw/hfi2/qp.h | 107 +
drivers/infiniband/hw/hfi2/qsfp.c | 787 +
drivers/infiniband/hw/hfi2/qsfp.h | 201 +
drivers/infiniband/hw/hfi2/rc.c | 3259 +++
drivers/infiniband/hw/hfi2/rc.h | 59 +
drivers/infiniband/hw/hfi2/ruc.c | 595 +
drivers/infiniband/hw/hfi2/sdma.c | 3971 ++++
drivers/infiniband/hw/hfi2/sdma.h | 1212 ++
drivers/infiniband/hw/hfi2/sdma_defs.h | 116 +
drivers/infiniband/hw/hfi2/sdma_txreq.h | 104 +
drivers/infiniband/hw/hfi2/sysfs.c | 752 +
drivers/infiniband/hw/hfi2/tid_rdma.c | 5538 ++++++
drivers/infiniband/hw/hfi2/tid_rdma.h | 320 +
drivers/infiniband/hw/hfi2/tid_system.c | 476 +
drivers/infiniband/hw/hfi2/trace.c | 535 +
drivers/infiniband/hw/hfi2/trace.h | 25 +
drivers/infiniband/hw/hfi2/trace_ctxts.h | 115 +
drivers/infiniband/hw/hfi2/trace_dbg.h | 118 +
drivers/infiniband/hw/hfi2/trace_ibhdrs.h | 458 +
drivers/infiniband/hw/hfi2/trace_iowait.h | 54 +
drivers/infiniband/hw/hfi2/trace_misc.h | 108 +
drivers/infiniband/hw/hfi2/trace_mmu.h | 72 +
drivers/infiniband/hw/hfi2/trace_pin.h | 201 +
drivers/infiniband/hw/hfi2/trace_rc.h | 125 +
drivers/infiniband/hw/hfi2/trace_rx.h | 171 +
drivers/infiniband/hw/hfi2/trace_tid.h | 1687 ++
drivers/infiniband/hw/hfi2/trace_tx.h | 1186 ++
drivers/infiniband/hw/hfi2/uc.c | 542 +
drivers/infiniband/hw/hfi2/ud.c | 1030 +
drivers/infiniband/hw/hfi2/user_exp_rcv.c | 1012 +
drivers/infiniband/hw/hfi2/user_exp_rcv.h | 404 +
drivers/infiniband/hw/hfi2/user_pages.c | 106 +
drivers/infiniband/hw/hfi2/user_sdma.c | 1671 ++
drivers/infiniband/hw/hfi2/user_sdma.h | 262 +
drivers/infiniband/hw/hfi2/uverbs.c | 598 +
drivers/infiniband/hw/hfi2/uverbs.h | 19 +
drivers/infiniband/hw/hfi2/verbs.c | 2052 ++
drivers/infiniband/hw/hfi2/verbs.h | 488 +
drivers/infiniband/hw/hfi2/verbs_txreq.c | 100 +
drivers/infiniband/hw/hfi2/verbs_txreq.h | 97 +
drivers/infiniband/sw/rdmavt/mmap.c | 22 +-
drivers/infiniband/sw/rdmavt/qp.c | 2 +-
drivers/infiniband/sw/rdmavt/vt.c | 8 +
drivers/infiniband/ulp/Makefile | 1 -
drivers/infiniband/ulp/opa_vnic/Kconfig | 9 -
drivers/infiniband/ulp/opa_vnic/Makefile | 9 -
.../infiniband/ulp/opa_vnic/opa_vnic_encap.c | 513 -
.../infiniband/ulp/opa_vnic/opa_vnic_encap.h | 524 -
.../ulp/opa_vnic/opa_vnic_ethtool.c | 183 -
.../ulp/opa_vnic/opa_vnic_internal.h | 329 -
.../infiniband/ulp/opa_vnic/opa_vnic_netdev.c | 400 -
.../infiniband/ulp/opa_vnic/opa_vnic_vema.c | 1056 -
.../ulp/opa_vnic/opa_vnic_vema_iface.c | 390 -
include/rdma/ib_verbs.h | 2 +
include/rdma/opa_port_info.h | 8 +-
include/rdma/rdma_vt.h | 10 +
include/uapi/rdma/hfi/hfi1_ioctl.h | 120 +-
include/uapi/rdma/hfi/hfi1_user.h | 282 +-
include/uapi/rdma/hfi2-abi.h | 726 +
include/uapi/rdma/ib_user_ioctl_verbs.h | 1 +
146 files changed, 88394 insertions(+), 5195 deletions(-)
delete mode 100644 Documentation/infiniband/opa_vnic.rst
delete mode 100644 Documentation/translations/zh_CN/infiniband/opa_vnic.rst
delete mode 100644 drivers/infiniband/hw/hfi1/vnic.h
delete mode 100644 drivers/infiniband/hw/hfi1/vnic_main.c
delete mode 100644 drivers/infiniband/hw/hfi1/vnic_sdma.c
create mode 100644 drivers/infiniband/hw/hfi2/Kconfig
create mode 100644 drivers/infiniband/hw/hfi2/Makefile
create mode 100644 drivers/infiniband/hw/hfi2/affinity.c
create mode 100644 drivers/infiniband/hw/hfi2/affinity.h
create mode 100644 drivers/infiniband/hw/hfi2/aspm.c
create mode 100644 drivers/infiniband/hw/hfi2/aspm.h
create mode 100644 drivers/infiniband/hw/hfi2/chip.c
create mode 100644 drivers/infiniband/hw/hfi2/chip.h
create mode 100644 drivers/infiniband/hw/hfi2/chip_gen.c
create mode 100644 drivers/infiniband/hw/hfi2/chip_gen.h
create mode 100644 drivers/infiniband/hw/hfi2/chip_jkr.c
create mode 100644 drivers/infiniband/hw/hfi2/chip_jkr.h
create mode 100644 drivers/infiniband/hw/hfi2/chip_registers.h
create mode 100644 drivers/infiniband/hw/hfi2/chip_registers_jkr.h
create mode 100644 drivers/infiniband/hw/hfi2/common.h
create mode 100644 drivers/infiniband/hw/hfi2/cport.c
create mode 100644 drivers/infiniband/hw/hfi2/cport.h
create mode 100644 drivers/infiniband/hw/hfi2/cport_traps.h
create mode 100644 drivers/infiniband/hw/hfi2/debugfs.c
create mode 100644 drivers/infiniband/hw/hfi2/debugfs.h
create mode 100644 drivers/infiniband/hw/hfi2/device.h
create mode 100644 drivers/infiniband/hw/hfi2/driver.c
create mode 100644 drivers/infiniband/hw/hfi2/efivar.c
create mode 100644 drivers/infiniband/hw/hfi2/efivar.h
create mode 100644 drivers/infiniband/hw/hfi2/eprom.c
create mode 100644 drivers/infiniband/hw/hfi2/eprom.h
create mode 100644 drivers/infiniband/hw/hfi2/exp_rcv.c
create mode 100644 drivers/infiniband/hw/hfi2/exp_rcv.h
create mode 100644 drivers/infiniband/hw/hfi2/fault.c
create mode 100644 drivers/infiniband/hw/hfi2/fault.h
create mode 100644 drivers/infiniband/hw/hfi2/file_ops.c
create mode 100644 drivers/infiniband/hw/hfi2/file_ops.h
create mode 100644 drivers/infiniband/hw/hfi2/firmware.c
create mode 100644 drivers/infiniband/hw/hfi2/hfi2.h
create mode 100644 drivers/infiniband/hw/hfi2/init.c
create mode 100644 drivers/infiniband/hw/hfi2/intr.c
create mode 100644 drivers/infiniband/hw/hfi2/iowait.c
create mode 100644 drivers/infiniband/hw/hfi2/iowait.h
create mode 100644 drivers/infiniband/hw/hfi2/ipoib.h
create mode 100644 drivers/infiniband/hw/hfi2/ipoib_main.c
create mode 100644 drivers/infiniband/hw/hfi2/ipoib_rx.c
create mode 100644 drivers/infiniband/hw/hfi2/ipoib_tx.c
create mode 100644 drivers/infiniband/hw/hfi2/mad.c
create mode 100644 drivers/infiniband/hw/hfi2/mad.h
create mode 100644 drivers/infiniband/hw/hfi2/mmu_rb.c
create mode 100644 drivers/infiniband/hw/hfi2/mmu_rb.h
create mode 100644 drivers/infiniband/hw/hfi2/msix.c
create mode 100644 drivers/infiniband/hw/hfi2/msix.h
create mode 100644 drivers/infiniband/hw/hfi2/netdev.h
create mode 100644 drivers/infiniband/hw/hfi2/netdev_rx.c
create mode 100644 drivers/infiniband/hw/hfi2/opa_compat.h
create mode 100644 drivers/infiniband/hw/hfi2/opfn.c
create mode 100644 drivers/infiniband/hw/hfi2/opfn.h
create mode 100644 drivers/infiniband/hw/hfi2/pcie.c
create mode 100644 drivers/infiniband/hw/hfi2/pin_system.c
create mode 100644 drivers/infiniband/hw/hfi2/pinning.c
create mode 100644 drivers/infiniband/hw/hfi2/pinning.h
create mode 100644 drivers/infiniband/hw/hfi2/pio.c
create mode 100644 drivers/infiniband/hw/hfi2/pio.h
create mode 100644 drivers/infiniband/hw/hfi2/pio_copy.c
create mode 100644 drivers/infiniband/hw/hfi2/platform.c
create mode 100644 drivers/infiniband/hw/hfi2/platform.h
create mode 100644 drivers/infiniband/hw/hfi2/qp.c
create mode 100644 drivers/infiniband/hw/hfi2/qp.h
create mode 100644 drivers/infiniband/hw/hfi2/qsfp.c
create mode 100644 drivers/infiniband/hw/hfi2/qsfp.h
create mode 100644 drivers/infiniband/hw/hfi2/rc.c
create mode 100644 drivers/infiniband/hw/hfi2/rc.h
create mode 100644 drivers/infiniband/hw/hfi2/ruc.c
create mode 100644 drivers/infiniband/hw/hfi2/sdma.c
create mode 100644 drivers/infiniband/hw/hfi2/sdma.h
create mode 100644 drivers/infiniband/hw/hfi2/sdma_defs.h
create mode 100644 drivers/infiniband/hw/hfi2/sdma_txreq.h
create mode 100644 drivers/infiniband/hw/hfi2/sysfs.c
create mode 100644 drivers/infiniband/hw/hfi2/tid_rdma.c
create mode 100644 drivers/infiniband/hw/hfi2/tid_rdma.h
create mode 100644 drivers/infiniband/hw/hfi2/tid_system.c
create mode 100644 drivers/infiniband/hw/hfi2/trace.c
create mode 100644 drivers/infiniband/hw/hfi2/trace.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_ctxts.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_dbg.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_ibhdrs.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_iowait.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_misc.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_mmu.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_pin.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_rc.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_rx.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_tid.h
create mode 100644 drivers/infiniband/hw/hfi2/trace_tx.h
create mode 100644 drivers/infiniband/hw/hfi2/uc.c
create mode 100644 drivers/infiniband/hw/hfi2/ud.c
create mode 100644 drivers/infiniband/hw/hfi2/user_exp_rcv.c
create mode 100644 drivers/infiniband/hw/hfi2/user_exp_rcv.h
create mode 100644 drivers/infiniband/hw/hfi2/user_pages.c
create mode 100644 drivers/infiniband/hw/hfi2/user_sdma.c
create mode 100644 drivers/infiniband/hw/hfi2/user_sdma.h
create mode 100644 drivers/infiniband/hw/hfi2/uverbs.c
create mode 100644 drivers/infiniband/hw/hfi2/uverbs.h
create mode 100644 drivers/infiniband/hw/hfi2/verbs.c
create mode 100644 drivers/infiniband/hw/hfi2/verbs.h
create mode 100644 drivers/infiniband/hw/hfi2/verbs_txreq.c
create mode 100644 drivers/infiniband/hw/hfi2/verbs_txreq.h
delete mode 100644 drivers/infiniband/ulp/opa_vnic/Kconfig
delete mode 100644 drivers/infiniband/ulp/opa_vnic/Makefile
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_ethtool.c
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_internal.h
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c
delete mode 100644 drivers/infiniband/ulp/opa_vnic/opa_vnic_vema_iface.c
create mode 100644 include/uapi/rdma/hfi2-abi.h

--
-Denny