net/mlx5: fix Rx Hash queue resource release in sample flow
PATCH 1/1 net/mlx5: fix Rx Hash queue resource release in sample flow
While the queue/rss action was added to sample action lists, the rx hash queue resource was allocated in the sample action translation to create the sample DR action later.
While there's a failure in the flow creation, the Rx hash queue resource of the sample action list was destroyed in the wrong place.
This patch adds the checking to release the Rx hash queue resource after the sample action release, to avoid one more extra release if there's a failure.
--- drivers/net/mlx5/mlx5_flow_dv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/mlx5/mlx5_flow_dv.c +2 -1
@@ -15656,7 +15656,8 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,SILIST_FOREACH (priv->sh->ipool[MLX5_IPOOL_MLX5_FLOW ], flow->dev_handles, handle_idx, dh, next) {/* hrxq is union, don't clear it if the flag is not set. */ -if (dh->fate_action ==MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq) { +if (dh->fate_action ==MLX5_FLOW_FATE_QUEUE && dh->rix_hrxq && + !dh->dvh.rix_sample && !dh->dvh.rix_dest_array) {mlx5_hrxq_release (dev, dh->rix_hrxq); dh->rix_hrxq =0 ; }else if (dh->fate_action ==MLX5_FLOW_FATE_SHARED_RSS ) {
Signature · 1 line
2.18.1
Quoted 17 lines
-----Original Message-----
From: Jiawei(Jonny) Wang <[email protected]>
Sent: Monday, May 20, 2024 17:07
To: Bing Zhao <[email protected]>; Suanming Mou <[email protected]>; Dariusz Sosnowski <[email protected]>; Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>; Matan Azrad <[email protected]>
Cc: [email protected]; Raslan Darawsheh <[email protected]>; [email protected]
Subject: [PATCH] net/mlx5: fix Rx Hash queue resource release in sample flowWhile the queue/rss action was added to sample action lists, the rx hash queue resource was allocated in the sample action translation to create the sample DR action later.
While there's a failure in the flow creation, the Rx hash queue resource of the sample action list was destroyed in the wrong place.
Quoted 8 lines
This patch adds the checking to release the Rx hash queue resource after the sample action release, to avoid one more extra release if there's a failure.
Fixes ca5eb60ecd5b ("net/mlx5: fix resource release for mirror flow")Signed-off-by Jiawei Wang <[email protected]>Reviewed-by Bing Zhao <[email protected]>
Best regards,
Dariusz Sosnowski
Hi,
From: Jiawei(Jonny) Wang <[email protected]>
Sent: Monday, May 20, 2024 6:07 PM
To: Bing Zhao; Suanming Mou; Dariusz Sosnowski; Slava Ovsiienko; Ori Kam; Matan Azrad
Cc: [email protected]; Raslan Darawsheh; [email protected]
Subject: [PATCH] net/mlx5: fix Rx Hash queue resource release in sample flow
While the queue/rss action was added to sample action lists, the rx hash queue resource was allocated in the sample action translation to create the sample DR action later.
While there's a failure in the flow creation, the Rx hash queue resource of the sample action list was destroyed in the wrong place.
This patch adds the checking to release the Rx hash queue resource after the sample action release, to avoid one more extra release if there's a failure.
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh