Skip to contentSkip to conversation

net/mlx5: fix shared RSS destroy failure

PATCH Superseded Rongwei Liu 1 participant 1 message Feb 23, 2022 Network drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5: fix shared RSS destroy failure

When both shared and non-shared RSS actions were present in single flow rule shared RSS index was 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 8e61555657b2 ("net/mlx5: fix shared RSS and mark actions combination")
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow_dv.c +2 -0
index ef9c66eddf..5349e5f439 100644
@@ -11063,6 +11063,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);
@@ -11073,6 +11074,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev,
 	if (rss_desc->hash_fields == 0)
 		rss_desc->queue_num = 1;
 	*hrxq_idx = mlx5_hrxq_get(dev, rss_desc);
+	rss_desc->shared_rss = shared_rss;
 	if (!*hrxq_idx)
 		return NULL;
 	hrxq = mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_HRXQ],
Signature · 1 line
2.27.0