1 Star 0 Fork 75

sky/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0116-net-hns3-modify-a-function-name.patch 2.88 KB
一键复制 编辑 原始数据 按行查看 历史
liudongdong3 提交于 2022-06-16 16:03 . sync patches from 22.07
From 25cd4e3af8f0c5e86bff599ea31a0e4024cf03d2 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 1 Jun 2022 11:52:48 +0800
Subject: [PATCH 116/122] net/hns3: modify a function name
The meaning of the "hns3_get_count" function is not precise enough.
Change from "hns3_get_count" to "hns3_fd_get_count".
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
drivers/net/hns3/hns3_fdir.c | 2 +-
drivers/net/hns3/hns3_fdir.h | 2 +-
drivers/net/hns3/hns3_flow.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index a0d6598e57..762b89a51e 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1099,7 +1099,7 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
return 0;
}
-int hns3_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value)
+int hns3_fd_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value)
{
struct hns3_fd_get_cnt_cmd *req;
struct hns3_cmd_desc desc;
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index 3376c40c8e..4d18759160 100644
--- a/drivers/net/hns3/hns3_fdir.h
+++ b/drivers/net/hns3/hns3_fdir.h
@@ -184,7 +184,7 @@ void hns3_fdir_filter_uninit(struct hns3_adapter *hns);
int hns3_fdir_filter_program(struct hns3_adapter *hns,
struct hns3_fdir_rule *rule, bool del);
int hns3_clear_all_fdir_filter(struct hns3_adapter *hns);
-int hns3_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value);
+int hns3_fd_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value);
int hns3_restore_all_fdir_filter(struct hns3_adapter *hns);
#endif /* _HNS3_FDIR_H_ */
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index e994cac314..b60ad596dc 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -164,13 +164,13 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t indirect, uint32_t id,
"Counter id is used, indirect flag not match");
/* Clear the indirect counter on first use. */
if (cnt->indirect && cnt->ref_cnt == 1)
- (void)hns3_get_count(hw, id, &value);
+ (void)hns3_fd_get_count(hw, id, &value);
cnt->ref_cnt++;
return 0;
}
/* Clear the counter by read ops because the counter is read-clear */
- ret = hns3_get_count(hw, id, &value);
+ ret = hns3_fd_get_count(hw, id, &value);
if (ret)
return rte_flow_error_set(error, EIO,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
@@ -210,7 +210,7 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
"Can't find counter id");
- ret = hns3_get_count(&hns->hw, flow->counter_id, &value);
+ ret = hns3_fd_get_count(&hns->hw, flow->counter_id, &value);
if (ret) {
rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "Read counter fail.");
--
2.22.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nlgwcy/dpdk.git
git@gitee.com:nlgwcy/dpdk.git
nlgwcy
dpdk
dpdk
master

搜索帮助