]> www.infradead.org Git - users/jedix/linux-maple.git/commit
RDMA/mlx5: Introduce the 'data direct' driver
authorYishai Hadas <yishaih@nvidia.com>
Thu, 1 Aug 2024 12:05:11 +0000 (15:05 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 11 Aug 2024 08:12:49 +0000 (11:12 +0300)
commit6910e3660d86c1a5654f742a40181d2c9154f26f
tree4ff513acc4c335d1e4db491f168d74a33e8f6bc8
parenta18eb864019e624bb4ea5778fce75cc903475ed5
RDMA/mlx5: Introduce the 'data direct' driver

Introduce the 'data direct' driver for a ConnectX-8 Data Direct device.

The 'data direct' driver functions as the affiliated DMA device for one
or more capable mlx5_ib devices. This DMA device, as the name suggests,
is used exclusively for DMA operations. It can be considered a DMA engine
managed by a PF/VF, lacking network capabilities and having minimal overall
capabilities.

Consequently, the DMA NIC PF will not be exposed to or directly used by
software applications. The driver will not have any direct interface or
interaction with the firmware (no command interface, no capabilities,
etc.). It will operate solely over PCI to enable its DMA functionality.

Registration and un-registration of the driver are handled as part of
the mlx5_ib initialization and exit processes, as the mlx5_ib devices
will effectively be its clients.

The driver will serve as the DMA device for accessing another PCI device
to achieve optimal performance (both on the same NUMA node, P2P access,
etc.).

Upon probing, it will read its VUID over PCI to handle mlx5_ib device
registrations with the same VUID.

Upon removal, it will notify its clients to allow them to clean up the
resources that were mmaped with its DMA device.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/b77edecfd476c3f445da96ab6aef499ae47b2829.1722512548.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/Makefile
drivers/infiniband/hw/mlx5/data_direct.c [new file with mode: 0644]
drivers/infiniband/hw/mlx5/data_direct.h [new file with mode: 0644]
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h