RDMA/mlx5: Add the initialization flow to utilize the 'data direct' device
authorYishai Hadas <yishaih@nvidia.com>
Thu, 1 Aug 2024 12:05:12 +0000 (15:05 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 11 Aug 2024 08:12:49 +0000 (11:12 +0300)
commit2e8e631d7a41e3a4edc94f3c9dd5cb32c2aa539e
tree4bd55abd6c8a026a405efb1cb7c4398bde3ee01a
parent6910e3660d86c1a5654f742a40181d2c9154f26f
RDMA/mlx5: Add the initialization flow to utilize the 'data direct' device

Add the NET device initialization flow to utilize the 'data
direct' device.

When a NET mlx5_ib device is capable of 'data direct', the following
sequence of actions will occur:
- Find its affiliated 'data direct' VUID via a firmware command.
- Create its own private PD and 'data direct' mkey.
- Register to be notified when its 'data direct' driver is probed or removed.

The DMA device of the affiliated 'data direct' device, including the
private PD and the 'data direct' mkey, will be used later during MR
registrations that request the data direct functionality.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://patch.msgid.link/b11fa87b2a65bce4db8d40341bb6cee490fa4d06.1722512548.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/cmd.c
drivers/infiniband/hw/mlx5/cmd.h
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h