Commit 46dc933c authored by Or Gerlitz's avatar Or Gerlitz Committed by Saeed Mahameed

net/mlx5e: Provide explicit directive if to create inner indirect tirs

Change the driver functions that deal with creating indirect tirs
to get a flag telling if inner ttc is desired.

A pre-step for enabling rss on the vport representors, where
inner ttc is not needed.
Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent c966f7d5
...@@ -906,8 +906,8 @@ void mlx5e_close_drop_rq(struct mlx5e_rq *drop_rq); ...@@ -906,8 +906,8 @@ void mlx5e_close_drop_rq(struct mlx5e_rq *drop_rq);
int mlx5e_create_indirect_rqt(struct mlx5e_priv *priv); int mlx5e_create_indirect_rqt(struct mlx5e_priv *priv);
int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv); int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc);
void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv); void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc);
int mlx5e_create_direct_rqts(struct mlx5e_priv *priv); int mlx5e_create_direct_rqts(struct mlx5e_priv *priv);
void mlx5e_destroy_direct_rqts(struct mlx5e_priv *priv); void mlx5e_destroy_direct_rqts(struct mlx5e_priv *priv);
......
...@@ -3175,7 +3175,7 @@ static void mlx5e_build_direct_tir_ctx(struct mlx5e_priv *priv, u32 rqtn, u32 *t ...@@ -3175,7 +3175,7 @@ static void mlx5e_build_direct_tir_ctx(struct mlx5e_priv *priv, u32 rqtn, u32 *t
MLX5_SET(tirc, tirc, rx_hash_fn, MLX5_RX_HASH_FN_INVERTED_XOR8); MLX5_SET(tirc, tirc, rx_hash_fn, MLX5_RX_HASH_FN_INVERTED_XOR8);
} }
int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv) int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc)
{ {
struct mlx5e_tir *tir; struct mlx5e_tir *tir;
void *tirc; void *tirc;
...@@ -3202,7 +3202,7 @@ int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv) ...@@ -3202,7 +3202,7 @@ int mlx5e_create_indirect_tirs(struct mlx5e_priv *priv)
} }
} }
if (!mlx5e_tunnel_inner_ft_supported(priv->mdev)) if (!inner_ttc || !mlx5e_tunnel_inner_ft_supported(priv->mdev))
goto out; goto out;
for (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++) { for (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++) {
...@@ -3273,14 +3273,14 @@ int mlx5e_create_direct_tirs(struct mlx5e_priv *priv) ...@@ -3273,14 +3273,14 @@ int mlx5e_create_direct_tirs(struct mlx5e_priv *priv)
return err; return err;
} }
void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv) void mlx5e_destroy_indirect_tirs(struct mlx5e_priv *priv, bool inner_ttc)
{ {
int i; int i;
for (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++) for (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++)
mlx5e_destroy_tir(priv->mdev, &priv->indir_tir[i]); mlx5e_destroy_tir(priv->mdev, &priv->indir_tir[i]);
if (!mlx5e_tunnel_inner_ft_supported(priv->mdev)) if (!inner_ttc || !mlx5e_tunnel_inner_ft_supported(priv->mdev))
return; return;
for (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++) for (i = 0; i < MLX5E_NUM_INDIR_TIRS; i++)
...@@ -4786,7 +4786,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv) ...@@ -4786,7 +4786,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv)
if (err) if (err)
goto err_destroy_indirect_rqts; goto err_destroy_indirect_rqts;
err = mlx5e_create_indirect_tirs(priv); err = mlx5e_create_indirect_tirs(priv, true);
if (err) if (err)
goto err_destroy_direct_rqts; goto err_destroy_direct_rqts;
...@@ -4811,7 +4811,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv) ...@@ -4811,7 +4811,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv)
err_destroy_direct_tirs: err_destroy_direct_tirs:
mlx5e_destroy_direct_tirs(priv); mlx5e_destroy_direct_tirs(priv);
err_destroy_indirect_tirs: err_destroy_indirect_tirs:
mlx5e_destroy_indirect_tirs(priv); mlx5e_destroy_indirect_tirs(priv, true);
err_destroy_direct_rqts: err_destroy_direct_rqts:
mlx5e_destroy_direct_rqts(priv); mlx5e_destroy_direct_rqts(priv);
err_destroy_indirect_rqts: err_destroy_indirect_rqts:
...@@ -4828,7 +4828,7 @@ static void mlx5e_cleanup_nic_rx(struct mlx5e_priv *priv) ...@@ -4828,7 +4828,7 @@ static void mlx5e_cleanup_nic_rx(struct mlx5e_priv *priv)
mlx5e_tc_nic_cleanup(priv); mlx5e_tc_nic_cleanup(priv);
mlx5e_destroy_flow_steering(priv); mlx5e_destroy_flow_steering(priv);
mlx5e_destroy_direct_tirs(priv); mlx5e_destroy_direct_tirs(priv);
mlx5e_destroy_indirect_tirs(priv); mlx5e_destroy_indirect_tirs(priv, true);
mlx5e_destroy_direct_rqts(priv); mlx5e_destroy_direct_rqts(priv);
mlx5e_destroy_rqt(priv, &priv->indir_rqt); mlx5e_destroy_rqt(priv, &priv->indir_rqt);
mlx5e_close_drop_rq(&priv->drop_rq); mlx5e_close_drop_rq(&priv->drop_rq);
......
...@@ -368,7 +368,7 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv) ...@@ -368,7 +368,7 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv)
if (err) if (err)
goto err_destroy_indirect_rqts; goto err_destroy_indirect_rqts;
err = mlx5e_create_indirect_tirs(priv); err = mlx5e_create_indirect_tirs(priv, true);
if (err) if (err)
goto err_destroy_direct_rqts; goto err_destroy_direct_rqts;
...@@ -385,7 +385,7 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv) ...@@ -385,7 +385,7 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv)
err_destroy_direct_tirs: err_destroy_direct_tirs:
mlx5e_destroy_direct_tirs(priv); mlx5e_destroy_direct_tirs(priv);
err_destroy_indirect_tirs: err_destroy_indirect_tirs:
mlx5e_destroy_indirect_tirs(priv); mlx5e_destroy_indirect_tirs(priv, true);
err_destroy_direct_rqts: err_destroy_direct_rqts:
mlx5e_destroy_direct_rqts(priv); mlx5e_destroy_direct_rqts(priv);
err_destroy_indirect_rqts: err_destroy_indirect_rqts:
...@@ -401,7 +401,7 @@ static void mlx5i_cleanup_rx(struct mlx5e_priv *priv) ...@@ -401,7 +401,7 @@ static void mlx5i_cleanup_rx(struct mlx5e_priv *priv)
{ {
mlx5i_destroy_flow_steering(priv); mlx5i_destroy_flow_steering(priv);
mlx5e_destroy_direct_tirs(priv); mlx5e_destroy_direct_tirs(priv);
mlx5e_destroy_indirect_tirs(priv); mlx5e_destroy_indirect_tirs(priv, true);
mlx5e_destroy_direct_rqts(priv); mlx5e_destroy_direct_rqts(priv);
mlx5e_destroy_rqt(priv, &priv->indir_rqt); mlx5e_destroy_rqt(priv, &priv->indir_rqt);
mlx5e_close_drop_rq(&priv->drop_rq); mlx5e_close_drop_rq(&priv->drop_rq);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment