Skip to content

mlx5: Move data direct infrastructure to mlx5_core

Tariq Toukan linux-rdma lkml netdev 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 1 replyApplied
  2. v110 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Changed error message on VUID query failure (Leon)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/10RDMA/mlx5: Notify data direct users via a notifier chain on unbinddrivers/infiniband/hw/mlx5/data_direct.c drivers/infiniband/hw/mlx5/data_direct.h drivers/infiniband/hw/mlx5/main.c +1 more+40 -70 replies
2/10RDMA/mlx5: Add mlx5_data_direct_supported() helperdrivers/infiniband/hw/mlx5/main.c include/linux/mlx5/driver.h+8 -40 replies
3/10RDMA/mlx5: Make the data direct VUID query self-containeddrivers/infiniband/hw/mlx5/cmd.c drivers/infiniband/hw/mlx5/cmd.h drivers/infiniband/hw/mlx5/data_direct.c +3 more+38 -240 replies
4/10RDMA/mlx5: Give the data direct PCI driver a proper namedrivers/infiniband/hw/mlx5/data_direct.c+1 -10 replies
5/10RDMA/mlx5: Move and rename data direct resource functionsdrivers/infiniband/hw/mlx5/data_direct.c drivers/infiniband/hw/mlx5/data_direct.h drivers/infiniband/hw/mlx5/main.c +1 more+94 -910 replies
6/10RDMA/mlx5: Add new registration stage for data direct usersdrivers/infiniband/hw/mlx5/data_direct.c drivers/infiniband/hw/mlx5/data_direct.h drivers/infiniband/hw/mlx5/main.c +2 more+118 -550 replies
7/10RDMA/mlx5: Extract IB specific lock out of data directdrivers/infiniband/hw/mlx5/data_direct.c drivers/infiniband/hw/mlx5/main.c drivers/infiniband/hw/mlx5/mlx5_ib.h +2 more+9 -90 replies
8/10RDMA/mlx5: Consolidate data direct state into one objectdrivers/infiniband/hw/mlx5/data_direct.c drivers/infiniband/hw/mlx5/data_direct.h drivers/infiniband/hw/mlx5/mlx5_ib.h +5 more+59 -620 replies
9/10RDMA/mlx5: Pull data_direct resource creation in init phasedrivers/infiniband/hw/mlx5/data_direct.c drivers/infiniband/hw/mlx5/data_direct.h drivers/infiniband/hw/mlx5/main.c+12 -140 replies
10/10mlx5: Move data direct implementation to mlx5_coredrivers/infiniband/hw/mlx5/Makefile drivers/infiniband/hw/mlx5/data_direct.h drivers/infiniband/hw/mlx5/main.c +11 more+95 -1130 replies

Reviews trailers per patch

7 of 10 patches have a Reviewed-by or Acked-by.

PatchLeon RomanovskyCosmin Ratiu
1/10R-b R-b
2/10R-b R-b
3/10R-b R-b
4/10R-b R-b
5/10R-b R-b
6/10R-b R-b
7/10R-b R-b
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH mlx5-next V2 00/10] mlx5: Move data direct infrastructure to mlx5_core

Hi,

Data direct support currently lives in mlx5_ib, which owns the data direct PCI driver, device matching and resource management. To prepare for data direct support in netdev, move this infrastructure to mlx5_core and provide a common interface for its consumers.

The series first replaces the direct IB unbind callback with a blocking notifier chain, allowing multiple consumers to receive unbind events. It then separates consumer registration from initialization, consolidates the per-device state and resources, and keeps IB-specific locking and MR teardown in mlx5_ib.

With these preparations in place, the final patch moves the shared implementation and PCI driver to mlx5_core. Data direct initialization and resource creation run during core load, before consumers attach; cleanup runs during core unload, after consumers detach.

The data direct PCI driver is also explicitly named "mlx5_dd", replacing the previous "mlx5_ib" name derived from KBUILD_MODNAME.

This series by Dragos prepares the shared infrastructure for netdev support. The netdev consumer will follow in a separate series.

Regards,
Tariq

V2:
- Changed error message on VUID query failure (Leon)

V1:
https://lore.kernel.org/all/[email protected]/

Dragos Tatulea (10):
RDMA/mlx5: Notify data direct users via a notifier chain on unbind RDMA/mlx5: Add mlx5_data_direct_supported() helper RDMA/mlx5: Make the data direct VUID query self-contained RDMA/mlx5: Give the data direct PCI driver a proper name RDMA/mlx5: Move and rename data direct resource functions RDMA/mlx5: Add new registration stage for data direct users RDMA/mlx5: Extract IB specific lock out of data direct RDMA/mlx5: Consolidate data direct state into one object RDMA/mlx5: Pull data_direct resource creation in init phase
mlx5: Move data direct implementation to mlx5_core

 drivers/infiniband/hw/mlx5/Makefile           |   1 -
 drivers/infiniband/hw/mlx5/cmd.c              |  21 -
 drivers/infiniband/hw/mlx5/cmd.h              |   2 -
 drivers/infiniband/hw/mlx5/data_direct.c      | 227 ----------
 drivers/infiniband/hw/mlx5/data_direct.h      |  23 -
 drivers/infiniband/hw/mlx5/main.c             | 144 +------
 drivers/infiniband/hw/mlx5/mlx5_ib.h          |  18 +-
 drivers/infiniband/hw/mlx5/mr.c               |   7 +-
 drivers/infiniband/hw/mlx5/odp.c              |   2 +-
 drivers/infiniband/hw/mlx5/std_types.c        |   3 +-
 drivers/infiniband/hw/mlx5/umr.c              |  11 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
 .../ethernet/mellanox/mlx5/core/data_direct.c | 400 ++++++++++++++++++
 .../net/ethernet/mellanox/mlx5/core/main.c    |  15 +
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   5 +
 include/linux/mlx5/data_direct.h              |  47 ++
 include/linux/mlx5/driver.h                   |   8 +
 17 files changed, 515 insertions(+), 421 deletions(-)
 delete mode 100644 drivers/infiniband/hw/mlx5/data_direct.c
 delete mode 100644 drivers/infiniband/hw/mlx5/data_direct.h
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/data_direct.c
 create mode 100644 include/linux/mlx5/data_direct.h

base-commit: 36b1d3299d0b6aa51485cc9a79b8d94948d5f3d4

Signature · 1 line
2.44.0