net/mlx5: TC, allow offload from uplink to other PF's VF
authorEli Cohen <elic@nvidia.com>
Wed, 8 Jun 2022 14:34:16 +0000 (17:34 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 6 Jul 2022 23:11:54 +0000 (16:11 -0700)
Redirecting traffic from uplink to a VF is a legal operation of
mulitport eswitch mode. Remove the limitation.

Fixes: 94db33177819 ("net/mlx5: Support multiport eswitch mode")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

index 3a39a50..9ca2c87 100644 (file)
@@ -3793,7 +3793,7 @@ static bool is_lag_dev(struct mlx5e_priv *priv,
 
 static bool is_multiport_eligible(struct mlx5e_priv *priv, struct net_device *out_dev)
 {
-       if (mlx5e_eswitch_uplink_rep(out_dev) &&
+       if (same_hw_reps(priv, out_dev) &&
            MLX5_CAP_PORT_SELECTION(priv->mdev, port_select_flow_table) &&
            MLX5_CAP_GEN(priv->mdev, create_lag_when_not_master_up))
                return true;