Commit f5d87b47 authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

net/mlx5e: E-Switch, Initialize E-Switch for eswitch manager

Initialize eswitch instance for a function which is eswitch manager
but 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 0279b545
......@@ -1622,7 +1622,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
struct mlx5_eswitch *esw;
int err;
if (!MLX5_VPORT_MANAGER(dev))
if (!MLX5_VPORT_MANAGER(dev) && !MLX5_ESWITCH_MANAGER(dev))
return 0;
esw = kzalloc(sizeof(*esw), GFP_KERNEL);
......@@ -1692,7 +1692,7 @@ int mlx5_eswitch_init(struct mlx5_core_dev *dev)
void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw)
{
if (!esw || !MLX5_VPORT_MANAGER(esw->dev))
if (!esw)
return;
esw_info(esw->dev, "cleanup\n");
......
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