Skip to content

Commit 5fb58c9

Browse files
mark-blochjgunthorpe
authored andcommitted
RDMA/mlx5: Don't create IB representors when in multiport RoCE mode
Switchdev mode and mutiport RoCE mode aren't compatible at this point. Don't create IB reps when a user switches to switchdev mode and the driver operates in that mode. Signed-off-by: Mark Bloch <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent d3b5cc1 commit 5fb58c9

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6630,7 +6630,8 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
66306630

66316631
if (MLX5_ESWITCH_MANAGER(mdev) &&
66326632
mlx5_ib_eswitch_mode(mdev->priv.eswitch) == SRIOV_OFFLOADS) {
6633-
mlx5_ib_register_vport_reps(mdev);
6633+
if (!mlx5_core_mp_enabled(mdev))
6634+
mlx5_ib_register_vport_reps(mdev);
66346635
return mdev;
66356636
}
66366637

0 commit comments

Comments
 (0)