From: Jie Hai <haijie1@huawei.com>
To: <dev@dpdk.org>, <thomas@monjalon.net>, <ferruh.yigit@amd.com>,
Chunsong Feng <fengchunsong@huawei.com>,
Ferruh Yigit <ferruh.yigit@intel.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Chengwen Feng <fengchengwen@huawei.com>,
Hao Chen <chenh@yusur.tech>
Cc: <lihuisong@huawei.com>, <haijie1@huawei.com>, <huangdengdui@huawei.com>
Subject: [PATCH 1/2] net/hns3: fix error code for repeatedly create counter
Date: Thu, 7 Nov 2024 19:56:44 +0800 [thread overview]
Message-ID: <20241107115645.22617-2-haijie1@huawei.com> (raw)
In-Reply-To: <20241107115645.22617-1-haijie1@huawei.com>
From: Dengdui Huang <huangdengdui@huawei.com>
Return EINVAL instead of ENOSPC when the same counter ID is
used for multiple times to create a counter.
Fixes: fcba820d9b9e ("net/hns3: support flow director")
Cc: stable@dpdk.org
Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
Signed-off-by: Jie Hai <haijie1@huawei.com>
---
drivers/net/hns3/hns3_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 192ffc015e14..266934b45bce 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -286,7 +286,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t indirect, uint32_t id,
cnt = hns3_counter_lookup(dev, id);
if (cnt) {
if (!cnt->indirect || cnt->indirect != indirect)
- return rte_flow_error_set(error, ENOTSUP,
+ return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION_CONF,
cnt,
"Counter id is used, indirect flag not match");
--
2.22.0
next prev parent reply other threads:[~2024-11-07 12:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 11:56 [PATCH 0/2] net/hns3: bugfix for hns3 Jie Hai
2024-11-07 11:56 ` Jie Hai [this message]
2024-11-07 16:21 ` [PATCH 1/2] net/hns3: fix error code for repeatedly create counter Stephen Hemminger
2024-11-07 11:56 ` [PATCH 2/2] net/hns3: fix cannot fully use hardware flow director table Jie Hai
2024-11-07 16:21 ` Stephen Hemminger
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=20241107115645.22617-2-haijie1@huawei.com \
--to=haijie1@huawei.com \
--cc=chenh@yusur.tech \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=fengchunsong@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=ferruh.yigit@intel.com \
--cc=huangdengdui@huawei.com \
--cc=humin29@huawei.com \
--cc=lihuisong@huawei.com \
--cc=thomas@monjalon.net \
/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).