From: Bodong Wang Date: Tue, 6 Jun 2023 07:12:18 +0000 (-0700) Subject: mlx5/core: E-Switch, Allocate ECPF vport if it's an eswitch manager X-Git-Tag: v6.5-rc1~163^2~144^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=eb8e9fae0a22;p=tomoyo%2Ftomoyo-test1.git mlx5/core: E-Switch, Allocate ECPF vport if it's an eswitch manager Eswitch vport is needed for eswitch manager when creating LAG, to create egress rules. However, this was not handled when ECPF is an eswitch manager. Signed-off-by: Bodong Wang Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c index 31956cd9d1bb..ecd8864d5d11 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c @@ -1601,7 +1601,8 @@ static int mlx5_esw_vports_init(struct mlx5_eswitch *esw) idx++; } - if (mlx5_ecpf_vport_exists(dev)) { + if (mlx5_ecpf_vport_exists(dev) || + mlx5_core_is_ecpf_esw_manager(dev)) { err = mlx5_esw_vport_alloc(esw, idx, MLX5_VPORT_ECPF); if (err) goto err;