1 Star 0 Fork 76

hantwofish/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0074-net-hns3-fix-error-code-for-repeatedly-create-counter.patch 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
huangdengdui 提交于 2024-11-11 18:33 . sync some patchs from upstreaming
From 520399c4f369d94e3ab5a35683ef381c6a8d36f1 Mon Sep 17 00:00:00 2001
From: Dengdui Huang <[email protected]>
Date: Thu, 7 Nov 2024 19:56:44 +0800
Subject: [PATCH] net/hns3: fix error code for repeatedly create counter
[ upstream commit 585f1f68f18c7acbc4f920053cbf4ba888e0c271 ]
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")
Signed-off-by: Dengdui Huang <[email protected]>
Signed-off-by: Jie Hai <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
---
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 40e2409..9a0b5d2 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.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hantwofish/dpdk.git
[email protected]:hantwofish/dpdk.git
hantwofish
dpdk
dpdk
master

搜索帮助