[4/4] net/mlx5: fix log error on non-template rule destroy

Message ID 20240723081522.1087433-5-bingz@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series non-template fixes set |

Checks

Context Check Description
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Bing Zhao July 23, 2024, 8:15 a.m. UTC
Log error message is raised on port stop when using same encap
action with two different rules.

It is a false alarm, checking return value not equals zero from
hlist unregister function was wrong since it returns 1 if the object
is still referenced.

Remove the check for return value for encap, decap, modify header and
matcher resource release under flow destroy cause all uses list/hlist
with return value 0/1.

Fixes: ff4064d5b1fe ("net/mlx5: support bulk actions in non-template flow")

Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Signed-off-by: Bing Zhao <bingz@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_hw.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 46f6665846..8a59d3c013 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -13792,17 +13792,12 @@  flow_hw_destroy(struct rte_eth_dev *dev, struct rte_flow_hw *flow)
 	if (flow->nt2hws->flow_aux)
 		mlx5_free(flow->nt2hws->flow_aux);
 
-	if (flow->nt2hws->rix_encap_decap) {
-		ret = flow_encap_decap_resource_release(dev, flow->nt2hws->rix_encap_decap);
-		if (ret)
-			DRV_LOG(ERR, "failed to release encap decap.");
-	}
+	if (flow->nt2hws->rix_encap_decap)
+		flow_encap_decap_resource_release(dev, flow->nt2hws->rix_encap_decap);
 	if (flow->nt2hws->modify_hdr) {
 		MLX5_ASSERT(flow->nt2hws->modify_hdr->action);
-		ret = mlx5_hlist_unregister(priv->sh->modify_cmds,
-			&flow->nt2hws->modify_hdr->entry);
-		if (ret)
-			DRV_LOG(ERR, "failed to release modify action.");
+		mlx5_hlist_unregister(priv->sh->modify_cmds,
+				      &flow->nt2hws->modify_hdr->entry);
 	}
 	if (flow->nt2hws->matcher)
 		flow_hw_unregister_matcher(dev, flow->nt2hws->matcher);