From patchwork Sun Jan 29 10:51:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 122624 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 A2FC5424B3; Sun, 29 Jan 2023 11:53:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E99542D49; Sun, 29 Jan 2023 11:52:24 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id BCA5640EE2; Sun, 29 Jan 2023 11:52:16 +0100 (CET) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4P4Skw4ThxznVK4; Sun, 29 Jan 2023 18:50:16 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sun, 29 Jan 2023 18:52:15 +0800 From: Dongdong Liu To: , , , CC: , , , Subject: [PATCH 08/10] net/hns3: fix useless warning when flush or destroy rule Date: Sun, 29 Jan 2023 18:51:38 +0800 Message-ID: <20230129105140.29921-9-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20230129105140.29921-1-liudongdong3@huawei.com> References: <20230129105140.29921-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemi500017.china.huawei.com (7.221.188.110) 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 types of the rule will no longer be used when user flush all rules or destroy a rule. But user would receive some RSS types warnings, like, "modified RSS types based on hardware support, requested:0x137f83fffc configured:0x3ffc". Fixes: ec674cb742e5 ("net/hns3: fix flushing RSS rule") Cc: stable@dpdk.org Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 7adde16cbc..fbc38dd3d4 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1537,17 +1537,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, .queue = conf->conf.queue, }; - /* Filter the unsupported flow types */ - flow_types = conf->conf.types ? - rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT : - hw->rss_info.conf.types; - if (flow_types != rss_flow_conf.types) - hns3_warn(hw, "modified RSS types based on hardware support, " - "requested:0x%" PRIx64 " configured:0x%" PRIx64, - rss_flow_conf.types, flow_types); - /* Update the useful flow types */ - rss_flow_conf.types = flow_types; - if (!add) { if (!conf->valid) return 0; @@ -1573,6 +1562,17 @@ hns3_config_rss_filter(struct hns3_hw *hw, return ret; } + /* Filter the unsupported flow types */ + flow_types = conf->conf.types ? + rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT : + hw->rss_info.conf.types; + if (flow_types != rss_flow_conf.types) + hns3_warn(hw, "modified RSS types based on hardware support," + " requested:0x%" PRIx64 " configured:0x%" PRIx64, + rss_flow_conf.types, flow_types); + /* Update the useful flow types */ + rss_flow_conf.types = flow_types; + /* Set hash algorithm and flow types by the user's config */ return hns3_hw_rss_hash_set(hw, &rss_flow_conf); }