Commit 99db5669 authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

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: default avatarRoi Dayan <roid@nvidia.com>
Reviewed-by: default avatarMaor Dickman <maord@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent c97c9fe4
......@@ -92,7 +92,7 @@ mlx5_eswitch_get_vport(struct mlx5_eswitch *esw, u16 vport_num)
{
struct mlx5_vport *vport;
if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager))
if (!esw)
return ERR_PTR(-EPERM);
vport = xa_load(&esw->vports, vport_num);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment