Skip to content

Commit 99db566

Browse files
roidayanSaeed Mahameed
authored andcommitted
net/mlx5e: E-Switch, Allow get vport api if esw exists
We could have an esw manager device which is not a vport group manager. Signed-off-by: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent c97c9fe commit 99db566

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num)
9292
{
9393
struct mlx5_vport *vport;
9494

95-
if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager))
95+
if (!esw)
9696
return ERR_PTR(-EPERM);
9797

9898
vport = xa_load(&esw->vports, vport_num);

0 commit comments

Comments
 (0)