DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bing Zhao <bingz@nvidia.com>
To: <dsosnowski@nvidia.com>, <viacheslavo@nvidia.com>, <dev@dpdk.org>,
	<rasland@nvidia.com>
Cc: <orika@nvidia.com>, <suanmingm@nvidia.com>, <matan@nvidia.com>,
	"Maayan Kashani" <mkashani@nvidia.com>
Subject: [PATCH 4/4] net/mlx5: fix log error on non-template rule destroy
Date: Tue, 23 Jul 2024 11:15:22 +0300	[thread overview]
Message-ID: <20240723081522.1087433-5-bingz@nvidia.com> (raw)
In-Reply-To: <20240723081522.1087433-1-bingz@nvidia.com>

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(-)

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);
-- 
2.34.1


  parent reply	other threads:[~2024-07-23  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  8:15 [PATCH 0/4] non-template fixes set Bing Zhao
2024-07-23  8:15 ` [PATCH 1/4] net/mlx5/hws: fix state detection of queue full in polling Bing Zhao
2024-07-23  8:15 ` [PATCH 2/4] net/mlx5: fix releasing order of compatible matcher Bing Zhao
2024-07-23  8:15 ` [PATCH 3/4] net/mlx5: fix matcher mask translation Bing Zhao
2024-07-23  8:15 ` Bing Zhao [this message]
2024-08-29  8:59 ` [PATCH 0/4] non-template fixes set Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240723081522.1087433-5-bingz@nvidia.com \
    --to=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=mkashani@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).