From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3614FA0552; Wed, 1 Jun 2022 05:54:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0EDB42B75; Wed, 1 Jun 2022 05:54:21 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id E0A9440A84 for ; Wed, 1 Jun 2022 05:54:12 +0200 (CEST) Received: from kwepemi500012.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LCZxY1vGbzjXD4 for ; Wed, 1 Jun 2022 11:53:21 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemi500012.china.huawei.com (7.221.188.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 1 Jun 2022 11:54:11 +0800 From: "Min Hu (Connor)" To: Subject: [PATCH v2 08/11] net/hns3: modify a function name Date: Wed, 1 Jun 2022 11:52:48 +0800 Message-ID: <20220601035251.16408-9-humin29@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220601035251.16408-1-humin29@huawei.com> References: <20220519122917.2334-1-humin29@huawei.com> <20220601035251.16408-1-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500012.china.huawei.com (7.221.188.12) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Huisong Li The meaning of the "hns3_get_count" function is not precise enough. This patch changes from "hns3_get_count" to "hns3_fd_get_count". Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- 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 8d588ffef3..d81f04a3f3 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 ca9edc5244..1bd4ac160d 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.33.0