From patchwork Tue Jan 31 13:02:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dongdong Liu X-Patchwork-Id: 122754 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 0E2CC41B8F; Tue, 31 Jan 2023 14:04:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8379542D38; Tue, 31 Jan 2023 14:03:45 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 423B742D2F; Tue, 31 Jan 2023 14:03:40 +0100 (CET) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4P5lZ31F7fzJs8L; Tue, 31 Jan 2023 21:02:03 +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; Tue, 31 Jan 2023 21:03:37 +0800 From: Dongdong Liu To: , , , CC: , , , Subject: [PATCH V3 08/10] net/hns3: fix useless warning when flush or destroy rule Date: Tue, 31 Jan 2023 21:02:58 +0800 Message-ID: <20230131130300.24713-9-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20230131130300.24713-1-liudongdong3@huawei.com> References: <20230129105140.29921-1-liudongdong3@huawei.com> <20230131130300.24713-1-liudongdong3@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) 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); }