From: Gregory Etelson <getelson@nvidia.com>
To: <dev@dpdk.org>
Cc: <getelson@nvidia.com>, <mkashani@nvidia.com>,
<rasland@nvidia.com>, Dariusz Sosnowski <dsosnowski@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>
Subject: [PATCH v2] net/mlx5: fix sync meter action
Date: Tue, 19 Mar 2024 13:24:55 +0200 [thread overview]
Message-ID: <20240319112455.329350-1-getelson@nvidia.com> (raw)
In-Reply-To: <20240318181045.272879-1-getelson@nvidia.com>
PMD implements sync METER flow action as async.
Queue selected for sync operations is `MLX5_HW_INV_QUEUE`.
That dummy queue value is translated into `CTRL_QUEUE_ID(priv)`.
Async job allocation converts INV queue into the real value, but
job release does not.
This patch fixes the queue value provided to `flow_hw_job_put()`.
This patch also removes dead code found in METER_MARK
destroy handler.
Coverity issue: 415806
Coverity issue: 415804
Fixes: 4359d9d1f76b ("net/mlx5: fix sync meter processing in HWS")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
v2: Fixed Coverity tag.
---
drivers/net/mlx5/mlx5_flow_hw.c | 5 +----
drivers/net/mlx5/mlx5_flow_meter.c | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 35f1ed7a03..9ebbe664d1 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -11494,10 +11494,7 @@ flow_hw_action_handle_destroy(struct rte_eth_dev *dev, uint32_t queue,
NULL, "Unable to wait for ASO meter CQE");
break;
}
- if (!job)
- mlx5_ipool_free(pool->idx_pool, idx);
- else
- aso = true;
+ aso = true;
break;
case MLX5_INDIRECT_ACTION_TYPE_RSS:
ret = flow_dv_action_destroy(dev, handle, error);
diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index 4045c4c249..ca361f7efa 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -2265,7 +2265,7 @@ mlx5_flow_meter_hws_create(struct rte_eth_dev *dev, uint32_t meter_id,
ret = mlx5_aso_meter_update_by_wqe(priv, MLX5_HW_INV_QUEUE, aso_mtr,
&priv->mtr_bulk, job, true);
if (ret) {
- flow_hw_job_put(priv, job, MLX5_HW_INV_QUEUE);
+ flow_hw_job_put(priv, job, CTRL_QUEUE_ID(priv));
return -rte_mtr_error_set(error, ENOTSUP,
RTE_MTR_ERROR_TYPE_UNSPECIFIED,
NULL, "Failed to create devx meter.");
--
2.39.2
next prev parent reply other threads:[~2024-03-19 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 18:10 [PATCH] " Gregory Etelson
2024-03-19 11:24 ` Gregory Etelson [this message]
2024-03-24 22:25 ` [PATCH v2] " Thomas Monjalon
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=20240319112455.329350-1-getelson@nvidia.com \
--to=getelson@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).