Skip to content

Commit aff2252

Browse files
ogerlitzSaeed Mahameed
authored andcommitted
IB/mlx5: Avoid dealing with vport representors if not being e-switch manager
In smartnic env, the host (PF) driver might not be an e-switch manager, hence the switchdev mode representors are running on the embedded cpu (EC) and not at the host. As such, we should avoid dealing with vport representors if not being esw manager. Fixes: b5ca15a ('IB/mlx5: Add proper representors support') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
1 parent 733d3e5 commit aff2252

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/mlx5/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6107,7 +6107,7 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
61076107
dev->num_ports = max(MLX5_CAP_GEN(mdev, num_ports),
61086108
MLX5_CAP_GEN(mdev, num_vhca_ports));
61096109

6110-
if (MLX5_VPORT_MANAGER(mdev) &&
6110+
if (MLX5_ESWITCH_MANAGER(mdev) &&
61116111
mlx5_ib_eswitch_mode(mdev->priv.eswitch) == SRIOV_OFFLOADS) {
61126112
dev->rep = mlx5_ib_vport_rep(mdev->priv.eswitch, 0);
61136113

0 commit comments

Comments
 (0)