net/mlx5: fix shared RSS destroy failure
PATCH v2 1/1 net/mlx5: fix shared RSS destroy failure
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.
--- drivers/net/mlx5/mlx5_flow_dv.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/mlx5/mlx5_flow_dv.c +2 -0
@@ -11206,6 +11206,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev, uint32_t *hrxq_idx) {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);
@@ -11217,6 +11218,7 @@ flow_dv_hrxq_prepare(struct rte_eth_dev *dev, rss_desc->queue_num =1 ; hrxq =mlx5_hrxq_get (dev, rss_desc); *hrxq_idx = hrxq ? hrxq->idx :0 ; + rss_desc->shared_rss = shared_rss;return hrxq; }
Signature · 1 line
2.27.0
Hi,
Quoted 24 lines
-----Original Message-----
From: Rongwei Liu <[email protected]>
Sent: Wednesday, March 2, 2022 1:20 PM
To: Matan Azrad <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; NBU-Contact- Thomas Monjalon (EXTERNAL) <[email protected]>; Suanming Mou <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH v2] net/mlx5: fix shared RSS destroy failureWhen both shared and non-shared RSS actions are present in single flow rule shared RSS index is unset by mistake.
For example:
1. flowindirect_action0 createaction_id3 ingress action RSS ...
2. setsample_actions0 mark id 43690 / queue index 0 / end
3. flow create 0 ingress group 107 pattern eth / sample ratio 2 index 0 / indirect 3 / endPMD translates the indirect action to a shared RSS description at first. In the split prefix flow,
RSS->shared_RSSis unset when translating sample queue action, the subfix flow will treat the RSS as non-shared.
Quoted 6 lines
Fixes 8e61555657b2 ("net/mlx5: fix shared RSS and mark actionscombination")
Signed-off-by Rongwei Liu <[email protected]>---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh