mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 22:57:21 -04:00
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: Roi Dayan <roid@nvidia.com> Reviewed-by: Maor Dickman <maord@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
committed by
Saeed Mahameed
parent
0279b5454c
commit
f5d87b47a1
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user