From patchwork Fri Jan 22 10:18:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Ou X-Patchwork-Id: 87085 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 61456A0A0A; Fri, 22 Jan 2021 11:20:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2AD09140F3C; Fri, 22 Jan 2021 11:19:25 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 416C5140F0C 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 4DMZvx6DxVzjC1T; 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:50 +0800 Message-ID: <1611310732-51975-13-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 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH 12/14] net/hns3: remove unnecessary parentheses 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" Remove unnecessary parentheses as well as keep a reasonable blank line. Signed-off-by: Lijun Ou --- drivers/net/hns3/hns3_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index f2bff1e..e9d0a0b 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -700,6 +700,7 @@ hns3_parse_udp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule, hns3_set_bit(rule->input_set, INNER_IP_PROTO, 1); rule->key_conf.spec.ip_proto = IPPROTO_UDP; rule->key_conf.mask.ip_proto = IPPROTO_MASK; + /* Only used to describe the protocol stack. */ if (item->spec == NULL && item->mask == NULL) return 0; @@ -1264,7 +1265,7 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, if (comp->func == RTE_ETH_HASH_FUNCTION_MAX) func_is_same = false; else - func_is_same = (with->func ? (comp->func == with->func) : true); + func_is_same = with->func ? (comp->func == with->func) : true; return (func_is_same && comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) && @@ -1861,6 +1862,7 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, flow, "Flow is NULL"); + filter_type = flow->filter_type; switch (filter_type) { case RTE_ETH_FILTER_FDIR: