]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/mlx5: Allocate IB device with net namespace supplied from core dev
authorMark Bloch <mbloch@nvidia.com>
Tue, 17 Jun 2025 08:44:02 +0000 (11:44 +0300)
committerLeon Romanovsky <leon@kernel.org>
Thu, 26 Jun 2025 12:10:07 +0000 (08:10 -0400)
commit611d08207d313500d010d8792424346ce70d0cfb
treeddc0c2571601070f0815d246b2ab1da40925180a
parent8cffca866ba86cbf0d097e56521b17d830956d4a
RDMA/mlx5: Allocate IB device with net namespace supplied from core dev

Use the new ib_alloc_device_with_net() API to allocate the IB device
so that it is properly bound to the network namespace obtained via
mlx5_core_net(). This change ensures correct namespace association
(e.g., for containerized setups).

Additionally, expose mlx5_core_net so that RDMA driver can use it.

Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/main.c
drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h
include/linux/mlx5/driver.h