From: Rongwei Liu <rongweil@nvidia.com>
To: <dev@dpdk.org>, <matan@nvidia.com>, <viacheslavo@nvidia.com>,
<orika@nvidia.com>, <suanmingm@nvidia.com>, <thomas@monjalon.net>
Cc: <hamdani@nvidia.com>
Subject: [PATCH v1 2/5] net/mlx5/hws: fix potential wrong rte_errno value
Date: Thu, 28 Sep 2023 05:33:37 +0300 [thread overview]
Message-ID: <20230928023341.1239731-3-rongweil@nvidia.com> (raw)
In-Reply-To: <20230928023341.1239731-1-rongweil@nvidia.com>
A valid rte_errno is desired when DR layer api returns error
and it can't over-write the value set by under-layer.
Fixes: 0a2657c4ff4d ("net/mlx5/hws: support insert header action")
Cc: hamdani@nvidia.com
Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_action.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c b/drivers/net/mlx5/hws/mlx5dr_action.c
index 769bb97e18..4e04d77852 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -2291,6 +2291,7 @@ mlx5dr_action_create_insert_header(struct mlx5dr_context *ctx,
if (!num_of_hdrs) {
DR_LOG(ERR, "Reformat num_of_hdrs cannot be zero");
+ rte_errno = EINVAL;
return NULL;
}
@@ -2338,7 +2339,6 @@ mlx5dr_action_create_insert_header(struct mlx5dr_context *ctx,
reformat_hdrs, log_bulk_size);
if (ret) {
DR_LOG(ERR, "Failed to create HWS reformat action");
- rte_errno = EINVAL;
goto free_reformat_hdrs;
}
--
2.27.0
next prev parent reply other threads:[~2023-09-28 2:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 2:33 [PATCH v1 0/5] Support IPv6 routing extension push remove action Rongwei Liu
2023-09-28 2:33 ` [PATCH v1 1/5] net/mlx5: sample the srv6 last segment Rongwei Liu
2023-09-28 2:33 ` Rongwei Liu [this message]
2023-09-28 2:33 ` [PATCH v1 3/5] net/mlx5/hws: add IPv6 routing extension push remove actions Rongwei Liu
2023-09-28 2:33 ` [PATCH v1 4/5] net/mlx5/hws: add setter for IPv6 routing push remove Rongwei Liu
2023-09-28 2:33 ` [PATCH v1 5/5] net/mlx5: implement " Rongwei Liu
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=20230928023341.1239731-3-rongweil@nvidia.com \
--to=rongweil@nvidia.com \
--cc=dev@dpdk.org \
--cc=hamdani@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--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).