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 36A18A00C2 for ; Thu, 3 Nov 2022 10:32:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F3FA427ED; Thu, 3 Nov 2022 10:32:26 +0100 (CET) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 8668D40694 for ; Thu, 3 Nov 2022 10:32:24 +0100 (CET) Received: by mail-wm1-f44.google.com with SMTP id bg9-20020a05600c3c8900b003bf249616b0so723775wmb.3 for ; Thu, 03 Nov 2022 02:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cCleKFcNVtoaOeHYAExMGCfWUee5UxZCzDMqHBxD808=; b=ja7dYhEdk5KisOMFnXPSu7Xo4Y2S/aC+04k6UILIZTSkZsZPUEzxBpL5F7u1c6NgY3 3B8d6dWdteFZxJt2XovqZdmjze1Olv3Ibl8MM2MwgLNgL5er5ZZaKMc7dWb/jDsY0M/p tI4m/AcSBLOI1OynNB3wwfyCdtnreZnwfoI1rmUazWJVdKX1ZFkSOypq6q372XW5380+ sCEQRxVC8xrD/+/V9MmRnZNOHikj0klER1WVx+hpvHUplzXUgxQgXevgWpSBgaMUFqe/ tv6WZsv0QzB6zOw5up6G8Zlng3ze+GkGO17e0JBUd9loVCRLU0PGKwpevQdeGCw7rEPk ZgQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cCleKFcNVtoaOeHYAExMGCfWUee5UxZCzDMqHBxD808=; b=4xbo+/OvA3+dZgw4yP/3Q/0o3Xv7lSLJC3g2L2UsMSCmniDjAeSlxvEDyWqZBAVe+T AfvIAPchL07v+UQDFpQSfZsguyVEukBarY3T+UhnJkmZinapN68lRYrcdtPNgAKUvu7o ruoBkBav89QA4ecFxrrRqNlnlfR2y34/GGJEActV7zoZDr8Z/SlHtAcJvu+7eIl3TEdk rMAzl/ASQVpDEEuyXzJUy5fPkJy1hIXeEkGOCZx5qApQvg6FoPpnnInZHdsE69+f6AhM LLdDdosQ+eEz56TAuw5RWDucykUMLZ9AveArPDcmhSUYA5VdJZ30dM0aQsNkUIFyjmlm jrJQ== X-Gm-Message-State: ACrzQf0ASuf33wT40EZe6DEkhXcVimCSxT2pbY6HIP5KEbH3qoN+7a71 XaZG5zsbKddHi8XBunHuAr7TtdVXkaqThsf1 X-Google-Smtp-Source: AMsMyM6FsiT23o3aSiPnXBjuxZXArLhKHnhRP9nH1rUAGj2+Y2qxISoa/K51p3URoYLrcvySCeucQw== X-Received: by 2002:a05:600c:230d:b0:3c4:2975:321a with SMTP id 13-20020a05600c230d00b003c42975321amr28752824wmo.155.1667467944196; Thu, 03 Nov 2022 02:32:24 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id n5-20020a05600c3b8500b003b4935f04a4sm934662wms.5.2022.11.03.02.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:32:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: fix RSS filter restore' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:35 +0000 Message-Id: <20221103092758.1099402-77-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/5a9558f9eb0d4647661562d218309d5e038627b4 Thanks. Luca Boccassi --- >From 5a9558f9eb0d4647661562d218309d5e038627b4 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 30 Sep 2022 15:22:03 +0800 Subject: [PATCH] net/hns3: fix RSS filter restore [ upstream commit 705a50800334de0681f181d679ba746df4b61be0 ] Currently, driver sets RSS function to 'RTE_ETH_HASH_FUNCTION_MAX' when user flush all rules in order to judge whether driver needs to restore RSS rules. In fact, all rules are saved in flow RSS list. So there is no need to modify RSS function to this macro. And this list can be used to restore. The modification of RSS function may introduce new problem. Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index c30a57d170..d1486175cc 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1556,8 +1556,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, rss_info->conf.queue_num = 0; } - /* set RSS func invalid after flushed */ - rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX; return 0; } @@ -1636,13 +1634,23 @@ int hns3_restore_rss_filter(struct rte_eth_dev *dev) { struct hns3_adapter *hns = dev->data->dev_private; + struct hns3_rss_conf_ele *filter; struct hns3_hw *hw = &hns->hw; + int ret = 0; - /* When user flush all rules, it doesn't need to restore RSS rule */ - if (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX) - return 0; + TAILQ_FOREACH(filter, &hw->flow_rss_list, entries) { + if (!filter->filter_info.valid) + continue; - return hns3_config_rss_filter(dev, &hw->rss_info, true); + ret = hns3_config_rss_filter(dev, &filter->filter_info, true); + if (ret != 0) { + hns3_err(hw, "restore RSS filter failed, ret=%d", ret); + goto out; + } + } + +out: + return ret; } static int -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.018779798 +0000 +++ 0077-net-hns3-fix-RSS-filter-restore.patch 2022-11-03 09:27:25.517425228 +0000 @@ -1 +1 @@ -From 705a50800334de0681f181d679ba746df4b61be0 Mon Sep 17 00:00:00 2001 +From 5a9558f9eb0d4647661562d218309d5e038627b4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 705a50800334de0681f181d679ba746df4b61be0 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 4952d807b8..2fb83f756a 100644 +index c30a57d170..d1486175cc 100644 @@ -26 +27 @@ -@@ -1587,8 +1587,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, +@@ -1556,8 +1556,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev, @@ -35 +36 @@ -@@ -1659,13 +1657,23 @@ int +@@ -1636,13 +1634,23 @@ int