diff options
author | Roi Dayan <roid@nvidia.com> | 2023-04-23 13:39:57 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2023-05-19 10:50:31 -0700 |
commit | f5d87b47a1d9dc14c048c84935397d97833ac706 (patch) | |
tree | b512b3024c3ef47bdd61cf2e3f5638a1fceeb83d | |
parent | 0279b5454c0e8344f30fcac90db76cf17b6b76c7 (diff) | |
download | linux-stable-f5d87b47a1d9dc14c048c84935397d97833ac706.tar.gz linux-stable-f5d87b47a1d9dc14c048c84935397d97833ac706.tar.bz2 linux-stable-f5d87b47a1d9dc14c048c84935397d97833ac706.zip |
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>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 9b71819e049a..31956cd9d1bb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -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 @@ abort: void mlx5_eswitch_cleanup(struct mlx5_eswitch *esw) { - if (!esw || !MLX5_VPORT_MANAGER(esw->dev)) + if (!esw) return; esw_info(esw->dev, "cleanup\n"); |