Skip to content

Commit

Permalink
net/mlx5: fix shared RSS destroy
Browse files Browse the repository at this point in the history
[ upstream commit e1786fd ]

When both shared and non-shared RSS actions are present in single
flow rule shared RSS index is unset by mistake.

For example:
1. flow indirect_action 0 create action_id 3 ingress action RSS ...
2. set sample_actions 0 mark id 43690 / queue index 0 / end
3. flow create 0 ingress group 107 pattern eth / sample ratio 2
   index 0  / indirect 3 / end

PMD translates the indirect action to a shared RSS description at first.
In the split prefix flow, RSS->shared_RSS is unset when translating
sample queue action, the subfix flow will treat the RSS as non-shared.

Fixes: 8e61555 ("net/mlx5: fix shared RSS and mark actions combination")

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
lrw514 authored and kevintraynor committed Mar 10, 2022
1 parent 5d3ade9 commit eebfb74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/mlx5/mlx5_flow_dv.c
Expand Up @@ -11102,6 +11102,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
{
struct mlx5_priv *priv = dev->data->dev_private;
struct mlx5_flow_handle *dh = dev_flow->handle;
uint32_t shared_rss = rss_desc->shared_rss;
struct mlx5_hrxq *hrxq;

MLX5_ASSERT(rss_desc->queue_num);
Expand All @@ -11116,6 +11117,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
return NULL;
hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
*hrxq_idx);
rss_desc->shared_rss = shared_rss;
return hrxq;
}

Expand Down Expand Up @@ -18324,4 +18326,3 @@ const struct mlx5_flow_driver_ops mlx5_flow_dv_drv_ops = {
};

#endif /* HAVE_IBV_FLOW_DV_SUPPORT */

0 comments on commit eebfb74

Please sign in to comment.