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 447AEA0A0A; Fri, 22 Jan 2021 11:20:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 921A6140F48; Fri, 22 Jan 2021 11:19:27 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 2920F140F09 for ; Fri, 22 Jan 2021 11:19:17 +0100 (CET) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DMZvx5rWVzjC0M; Fri, 22 Jan 2021 18:18:05 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Fri, 22 Jan 2021 18:19:12 +0800 From: Lijun Ou To: , CC: , Date: Fri, 22 Jan 2021 18:18:49 +0800 Message-ID: <1611310732-51975-12-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1611310732-51975-1-git-send-email-oulijun@huawei.com> References: <1611310732-51975-1-git-send-email-oulijun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 11/14] net/hns3: adjust some comments 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 Sender: "dev" Fixe some error comments and remove some meaningless comments. Signed-off-by: Lijun Ou --- drivers/net/hns3/hns3_flow.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 8a5179d..f2bff1e 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -91,9 +91,9 @@ net_addr_to_host(uint32_t *dst, const rte_be32_t *src, size_t len) /* * This function is used to find rss general action. * 1. As we know RSS is used to spread packets among several queues, the flow - * API provide the struct rte_flow_action_rss, user could config it's field + * API provide the struct rte_flow_action_rss, user could config its field * sush as: func/level/types/key/queue to control RSS function. - * 2. The flow API also support queue region configuration for hns3. It was + * 2. The flow API also supports queue region configuration for hns3. It was * implemented by FDIR + RSS in hns3 hardware, user can create one FDIR rule * which action is RSS queues region. * 3. When action is RSS, we use the following rule to distinguish: @@ -128,11 +128,11 @@ hns3_find_rss_general_action(const struct rte_flow_item pattern[], rss = act->conf; if (have_eth && rss->conf.queue_num) { /* - * Patter have ETH and action's queue_num > 0, indicate this is + * Pattern have ETH and action's queue_num > 0, indicate this is * queue region configuration. * Because queue region is implemented by FDIR + RSS in hns3 - * hardware, it need enter FDIR process, so here return NULL to - * avoid enter RSS process. + * hardware, it needs to enter FDIR process, so here return NULL + * to avoid enter RSS process. */ return NULL; } @@ -405,7 +405,6 @@ hns3_handle_actions(struct rte_eth_dev *dev, return 0; } -/* Parse to get the attr and action info of flow director rule. */ static int hns3_check_attr(const struct rte_flow_attr *attr, struct rte_flow_error *error) { @@ -782,7 +781,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule, } /* - * Check items before tunnel, save inner configs to outer configs,and clear + * Check items before tunnel, save inner configs to outer configs, and clear * inner configs. * The key consists of two parts: meta_data and tuple keys. * Meta data uses 15 bits, including vlan_num(2bit), des_port(12bit) and tunnel @@ -1473,10 +1472,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) if (ret) return ret; - /* Update algorithm of hw */ hw->rss_info.conf.func = rss_config->func; - /* Set flow type supported */ tuple = &hw->rss_info.rss_tuple_sets; ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_config->types); if (ret) @@ -1561,7 +1558,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, if (rss_flow_conf.queue_num) { /* * Due the content of queue pointer have been reset to - * 0, the rss_info->conf.queue should be set NULL + * 0, the rss_info->conf.queue should be set to NULL */ rss_info->conf.queue = NULL; rss_info->conf.queue_num = 0; @@ -1727,7 +1724,7 @@ hns3_flow_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr, /* * Create or destroy a flow rule. * Theorically one rule can match more than one filters. - * We will let it use the filter which it hitt first. + * We will let it use the filter which it hit first. * So, the sequence matters. */ static struct rte_flow * -- 2.7.4