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 BCECC41D4F for ; Thu, 23 Feb 2023 10:39:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B93B44319C; Thu, 23 Feb 2023 10:39:33 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 9012F4319C for ; Thu, 23 Feb 2023 10:39:32 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id p18-20020a05600c359200b003dc57ea0dfeso9512833wmq.0 for ; Thu, 23 Feb 2023 01:39:32 -0800 (PST) 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=6MKm834lZBk1ACD96JRtuUX2rHbGPmhm+11ZvR4mqEU=; b=SmozyVAXllMNf8PJyGUA7V1REkSbqlcR4s66/9nrErbIWpytCIAJjC+SRj9pQ8WReo EsOmd3gsMwKmdPKmVZeeCgEd7oUIOAuHUx6PTyjXNsAf3Dcd7ibDqJ1SZ/AbXXbsSYIF b+BQA6DjkjlC8ouIuvv8WqOrRu1WN0SGwPX/ZoWzs6VxfmEPxI6VEUdYwarIQgksc/Rp zA0PNaQs5DFcVCo0jsasv8saAJ9hWDuuYJNZxeETiopd55afm2p1647Cr48D/x+Z0evN OYAcsb1qkjcfKKse+cxBzpftLSIQtlaDAS+2NeJoIFxuG36xe7uGXLBcYDENHP6fb05/ jraw== 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=6MKm834lZBk1ACD96JRtuUX2rHbGPmhm+11ZvR4mqEU=; b=aVqrmD3z3gyTMxvoo7fLRMhpjSIMvfUS4TWn2JCJDToMtB1MUh5Z0szZXVWHg/hW38 PCVHyxg9RbbstufggrIsSRP6qTUZKtuxJzeIT8DiivJNr6Z3zDQRnXCscP4zUqE8hSmn AFCf785m0UTW2ExW2nO+YfpfXd0nGHEVVNUUXEwbob7fz5y0dwGdeFsGlHICGh4izuoV 2r1YOGKx1xUUsAmTCl48lxCMeQLSeEuUglfJ0c1+2zI1VEPDn9QVeCU77xzeUyg4mB0s CEldTAAPovxhE9h6b8HrEQYCUCiAsY8rXfgaFwtzweNLOwh8LYLgI083hawur+J28Bbc ih0g== X-Gm-Message-State: AO0yUKU9uSnuGR5I7IH5EKi48rfoFGdnxMlnzTmwhXzbgmu9FbFYFaGY ie/PsTor5gxXM6U/+QymotCNVB3Fxs5n4g== X-Google-Smtp-Source: AK7set9UbkWPOELF1f5aTv0yxjfoKhh2ebHTs+SPbpI6ikc99PJUulj16pCSUP8UK1sEAtFKodbNVA== X-Received: by 2002:a05:600c:a694:b0:3da:1f6a:7b36 with SMTP id ip20-20020a05600ca69400b003da1f6a7b36mr8468938wmb.0.1677145172336; Thu, 23 Feb 2023 01:39:32 -0800 (PST) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id z20-20020a7bc7d4000000b003e6efc0f91csm9071880wmk.42.2023.02.23.01.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:39:32 -0800 (PST) From: luca.boccassi@gmail.com To: Huisong Li Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: remove useless code when destroy valid RSS rule' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:48 +0000 Message-Id: <20230223093715.3926893-44-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/25/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/b3663385a2aeff0fee1fe9bfed703c657eb29705 Thanks. Luca Boccassi --- >From b3663385a2aeff0fee1fe9bfed703c657eb29705 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Tue, 31 Jan 2023 21:02:57 +0800 Subject: [PATCH] net/hns3: remove useless code when destroy valid RSS rule [ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ] When all rules are flushed the hw::rss_info::conf::func set to RTE_ETH_HASH_FUNCTION_MAX and hw::rss_info::conf::queue set to NULL which indicates no flow rules is issued. See: commit eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush"). Actually, the way determining whether there are rules has been changed by walking the flow RSS list. See: commit 705a50800334 ("net/hns3: fix RSS filter restore"). In addition, the rte_flow_action_rss from user isn't saved to 'conf' in hw->rss_info now. So this code can be removed. Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush") Fixes: 705a50800334 ("net/hns3: fix RSS filter restore") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 0e0cf418ee..f6de004fbc 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1258,19 +1258,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, bool rss_key_is_same; bool func_is_same; - /* - * When user flush all RSS rule, RSS func is set invalid with - * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after - * flushed, any validate RSS func is different with it before - * flushed. Others, when user create an action RSS with RSS func - * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same - * between continuous RSS flow. - */ - if (comp->func == RTE_ETH_HASH_FUNCTION_MAX) - func_is_same = false; - else - func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ? - (comp->func == with->func) : true; + func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ? + (comp->func == with->func) : true; if (with->key_len == 0 || with->key == NULL) rss_key_is_same = 1; @@ -1501,7 +1490,6 @@ static int hns3_config_rss_filter(struct hns3_hw *hw, const struct hns3_rss_conf *conf, bool add) { - struct hns3_rss_conf *rss_info; uint64_t flow_types; uint16_t num; int ret; @@ -1528,7 +1516,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, /* Update the useful flow types */ rss_flow_conf.types = flow_types; - rss_info = &hw->rss_info; if (!add) { if (!conf->valid) return 0; @@ -1539,15 +1526,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, return ret; } - 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 to NULL - */ - rss_info->conf.queue = NULL; - rss_info->conf.queue_num = 0; - } - return 0; } -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:29.993376016 +0000 +++ 0044-net-hns3-remove-useless-code-when-destroy-valid-RSS-.patch 2023-02-23 09:36:28.274170824 +0000 @@ -1 +1 @@ -From 546031ba551485c3e3aa57c3698975c2852cbef1 Mon Sep 17 00:00:00 2001 +From b3663385a2aeff0fee1fe9bfed703c657eb29705 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -30 +31 @@ -index 4cca675c53..3809fcc2d7 100644 +index 0e0cf418ee..f6de004fbc 100644 @@ -33 +34 @@ -@@ -1279,19 +1279,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, +@@ -1258,19 +1258,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, @@ -55 +56 @@ -@@ -1533,7 +1522,6 @@ static int +@@ -1501,7 +1490,6 @@ static int @@ -63 +64 @@ -@@ -1560,7 +1548,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, +@@ -1528,7 +1516,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, @@ -71 +72 @@ -@@ -1571,15 +1558,6 @@ hns3_config_rss_filter(struct hns3_hw *hw, +@@ -1539,15 +1526,6 @@ hns3_config_rss_filter(struct hns3_hw *hw,