From: Itamar Gozlan <igozlan@nvidia.com>
To: <valex@nvidia.com>, <viacheslavo@nvidia.com>, <matan@nvidia.com>,
<thomas@monjalon.net>, <suanmingm@nvidia.com>,
Ori Kam <orika@nvidia.com>
Cc: <dev@dpdk.org>
Subject: [v1 2/5] net/mlx5/hws: allow destroying rule resources on error
Date: Tue, 4 Jul 2023 13:46:42 +0300 [thread overview]
Message-ID: <20230704104645.19800-2-igozlan@nvidia.com> (raw)
In-Reply-To: <20230704104645.19800-1-igozlan@nvidia.com>
From: Alex Vesker <valex@nvidia.com>
In case the send engine is in error state API should provide
a way to free rule resources and provide a fake completion.
Otherwise there is no way to release these resources.
Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_rule.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 071e1ad769..931c68b160 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -521,6 +521,11 @@ static int mlx5dr_rule_destroy_hws(struct mlx5dr_rule *rule,
queue = &ctx->send_queue[attr->queue_id];
+ if (unlikely(mlx5dr_send_engine_err(queue))) {
+ mlx5dr_rule_destroy_failed_hws(rule, attr);
+ return 0;
+ }
+
/* Rule is not completed yet */
if (rule->status == MLX5DR_RULE_STATUS_CREATING) {
rte_errno = EBUSY;
@@ -533,11 +538,6 @@ static int mlx5dr_rule_destroy_hws(struct mlx5dr_rule *rule,
return 0;
}
- if (unlikely(mlx5dr_send_engine_err(queue))) {
- mlx5dr_rule_destroy_failed_hws(rule, attr);
- return 0;
- }
-
mlx5dr_send_engine_inc_rule(queue);
/* Send dependent WQE */
--
2.18.1
next prev parent reply other threads:[~2023-07-04 10:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 7:21 [PATCH 1/5] net/mlx5/hws: remove uneeded new line for DR_LOG Itamar Gozlan
2023-06-29 7:21 ` [PATCH 2/5] net/mlx5/hws: allow destroying rule resources on error Itamar Gozlan
2023-06-29 7:21 ` [PATCH 3/5] net/mlx5/hws: remove duplicated reformat type Itamar Gozlan
2023-06-29 7:21 ` [PATCH 4/5] net/mlx5/hws: renaming FT to TBL Itamar Gozlan
2023-06-29 7:21 ` [PATCH 5/5] net/mlx5/hws: support default miss action on FDB Itamar Gozlan
2023-07-02 4:57 ` [v2 1/5] net/mlx5: support indirect list METER_MARK action Itamar Gozlan
2023-07-02 4:57 ` [v2 2/5] app/testpmd: support indirect actions list syntax Itamar Gozlan
2023-07-02 4:57 ` [v2 3/5] net/mlx5: add indirect encap decap support Itamar Gozlan
2023-07-02 4:57 ` [v2 4/5] net/mlx5: support symmetric RSS hash function Itamar Gozlan
2023-07-04 10:46 ` [v1 1/5] net/mlx5/hws: remove uneeded new line for DR_LOG Itamar Gozlan
2023-07-04 10:46 ` Itamar Gozlan [this message]
2023-07-04 10:46 ` [v1 3/5] net/mlx5/hws: remove duplicated reformat type Itamar Gozlan
2023-07-04 10:46 ` [v1 4/5] net/mlx5/hws: renaming FT to TBL Itamar Gozlan
2023-07-04 10:46 ` [v1 5/5] net/mlx5/hws: support default miss action on FDB Itamar Gozlan
2023-07-04 16:04 ` [v3 1/5] net/mlx5/hws: remove unneeded new line for DR_LOG Itamar Gozlan
2023-07-04 16:04 ` [v3 2/5] net/mlx5/hws: allow destroying rule resources on error Itamar Gozlan
2023-07-04 16:04 ` [v3 3/5] net/mlx5/hws: remove duplicated reformat type Itamar Gozlan
2023-07-04 16:04 ` [v3 4/5] net/mlx5/hws: renaming FT to TBL Itamar Gozlan
2023-07-04 16:04 ` [v3 5/5] net/mlx5/hws: support default miss action on FDB Itamar Gozlan
2023-07-06 14:57 ` [v3 1/5] net/mlx5/hws: remove unneeded new line for DR_LOG Raslan Darawsheh
2023-07-02 4:57 ` [v2 5/5] net/mlx5/hws: support default miss action on FDB Itamar Gozlan
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=20230704104645.19800-2-igozlan@nvidia.com \
--to=igozlan@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=valex@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).