diff mbox series

[net-next,4/6] net/mlx5: Lag, Enable Multiport E-Switch offloads on 8 ports LAG

Message ID 20250226114752.104838-5-tariqt@nvidia.com (mailing list archive)
State Handled Elsewhere
Headers show
Series mlx5 misc enhancements 2025-02-26 | expand

Commit Message

Tariq Toukan Feb. 26, 2025, 11:47 a.m. UTC
From: Amir Tzin <amirtz@nvidia.com>

Patch [1] added mlx5 driver support for 8 ports HCAs which are available
since ConnectX-8. Now that Multiport E-Switch is tested, we can enable
it by removing flag MLX5_LAG_MPESW_OFFLOADS_SUPPORTED_PORTS.

[1]
commit e0e6adfe8c20 ("net/mlx5: Enable 8 ports LAG")

Signed-off-by: Amir Tzin <amirtz@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Michal Swiatkowski March 4, 2025, 7:12 a.m. UTC | #1
On Wed, Feb 26, 2025 at 01:47:50PM +0200, Tariq Toukan wrote:
> From: Amir Tzin <amirtz@nvidia.com>
> 
> Patch [1] added mlx5 driver support for 8 ports HCAs which are available
> since ConnectX-8. Now that Multiport E-Switch is tested, we can enable
> it by removing flag MLX5_LAG_MPESW_OFFLOADS_SUPPORTED_PORTS.
> 
> [1]
> commit e0e6adfe8c20 ("net/mlx5: Enable 8 ports LAG")
> 
> Signed-off-by: Amir Tzin <amirtz@nvidia.com>
> Signed-off-by: Mark Bloch <mbloch@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
> index ffac0bd6c895..cbde54324059 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
> @@ -65,7 +65,6 @@ static int mlx5_mpesw_metadata_set(struct mlx5_lag *ldev)
>  	return err;
>  }
>  
> -#define MLX5_LAG_MPESW_OFFLOADS_SUPPORTED_PORTS 4
>  static int enable_mpesw(struct mlx5_lag *ldev)
>  {
>  	int idx = mlx5_lag_get_dev_index_by_seq(ldev, MLX5_LAG_P1);
> @@ -77,9 +76,6 @@ static int enable_mpesw(struct mlx5_lag *ldev)
>  		return -EINVAL;
>  
>  	dev0 = ldev->pf[idx].dev;
> -	if (ldev->ports > MLX5_LAG_MPESW_OFFLOADS_SUPPORTED_PORTS)
> -		return -EOPNOTSUPP;
> -
>  	if (mlx5_eswitch_mode(dev0) != MLX5_ESWITCH_OFFLOADS ||
>  	    !MLX5_CAP_PORT_SELECTION(dev0, port_select_flow_table) ||
>  	    !MLX5_CAP_GEN(dev0, create_lag_when_not_master_up) ||

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

> -- 
> 2.45.0
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
index ffac0bd6c895..cbde54324059 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.c
@@ -65,7 +65,6 @@  static int mlx5_mpesw_metadata_set(struct mlx5_lag *ldev)
 	return err;
 }
 
-#define MLX5_LAG_MPESW_OFFLOADS_SUPPORTED_PORTS 4
 static int enable_mpesw(struct mlx5_lag *ldev)
 {
 	int idx = mlx5_lag_get_dev_index_by_seq(ldev, MLX5_LAG_P1);
@@ -77,9 +76,6 @@  static int enable_mpesw(struct mlx5_lag *ldev)
 		return -EINVAL;
 
 	dev0 = ldev->pf[idx].dev;
-	if (ldev->ports > MLX5_LAG_MPESW_OFFLOADS_SUPPORTED_PORTS)
-		return -EOPNOTSUPP;
-
 	if (mlx5_eswitch_mode(dev0) != MLX5_ESWITCH_OFFLOADS ||
 	    !MLX5_CAP_PORT_SELECTION(dev0, port_select_flow_table) ||
 	    !MLX5_CAP_GEN(dev0, create_lag_when_not_master_up) ||