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 00FD241D44 for ; Mon, 27 Feb 2023 08:12:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAAE0410D3; Mon, 27 Feb 2023 08:12:24 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id C8C3A40A84 for ; Mon, 27 Feb 2023 08:12:23 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=doj7ZDTKwucut4GqlNq/rDrfUGsR+ow/0yP6ULcDs2OnsTEmWT7QXL9AETb005jsqS3le60EWPmMSymTsnjC0WvHjEA9t9y8s+W+/LwDa4GUfrKp1GiQDLkeTkeh+RpfRY0OKoZNY6Ovzk92KkKA8MlhWt9ForDyV7KFtC64iYK/kzED+nX3HSNceUau4L4lrJj0nl44iJJqUvAn6yzMsxRqZPdk3MaPPGE0KkrQ5O8JSKQl2adJwcrM8elXonm7/bCmdi00d/e/olK2sn9oRXjZMEwu31e3irdYvhBaEZCtYjy/SDB6TM1MSHfasSnAXaTVN3nSHodtlBYLclu6bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WeghsR5foey82ruD0r6ZsJiGccaTNR9ATXwFWN1xiME=; b=dQB99T6MczA/+6gRw6D6jlfxYyW9C8vAOAdLBcj9j6SEJAWlacBxgA8AQ13ngvzvtbDKsTF9sCgAjDBwxm+9F+HnfsCkJZIqh8bsPD5yqZTQZAWS5xT2/Q/IDnwHLmDAcWPaf3XGyRljkm2vewCAynVHmDPU3tZ1cSuilkCn678Xqda+BKCx9KOcaI8mbiQGeDBhwg2sVfXlJNp2gvpfXQcgI9+U1mfA96LNCoVw0Vz5zCFaAdeEsrjklHa5OCkxVspqUrIloudHUfgO5O/qwxBMkL4DENgiHHcyd0zAUeij55ShJO4/ClnaVVkfgFPiNaxzEZ1Gr2mLUT7z/SMUPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WeghsR5foey82ruD0r6ZsJiGccaTNR9ATXwFWN1xiME=; b=ncnbB/4kJfVJ8EfcWuJsYuZZnVKn+mC5Xw9FQ1qq384rOs95vNvUMGf2Cd8aKonsAw9JOrphEi5iISKqk4wPlfeeieA9phcYlJk486Qcv34VSgpzV3Fg3dtlO5ZxFNt2/1mv+/iNRudydSRTsP6NLnrcGLshOMUnXWWzyv1h6oh2n8zsoklbKG3rasw0Cd/zobxxvCfolD0KNFE4yJy1KsRWboHruwfVIvhEwRoGJ8Df7s9sbBOVXhqlW34F1jD1/XeS0chH611NH7Aet1PgljcX+467ZrwikSAxS6YlbFHMMgOOWi/YUvAHKadqTzlTdLh0V0KGKU3J/t8P/+42Gw== Received: from DM6PR12CA0031.namprd12.prod.outlook.com (2603:10b6:5:1c0::44) by SA1PR12MB6972.namprd12.prod.outlook.com (2603:10b6:806:24f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29; Mon, 27 Feb 2023 07:12:22 +0000 Received: from DM6NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::cb) by DM6PR12CA0031.outlook.office365.com (2603:10b6:5:1c0::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:12:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DM6NAM11FT016.mail.protection.outlook.com (10.13.173.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 07:12:21 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:12:10 -0800 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 26 Feb 2023 23:12:08 -0800 From: Xueming Li 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 22.11.2 Date: Mon, 27 Feb 2023 15:00:10 +0800 Message-ID: <20230227070107.15664-102-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT016:EE_|SA1PR12MB6972:EE_ X-MS-Office365-Filtering-Correlation-Id: 114eb75a-00e9-483d-7aaf-08db1891f806 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ptF/Iy1kF5nXnPSggGTtD9ZK5E29QOD42pgvaGNc+dI0dlTP9XWa4nJ3oFgbbNiK19cq7plIwrZUp3dZzjXx8TKgU7vqAGg+6cwiw5+ZN9CIP8XRxA5GTvraBi1u00VcXTJ9hKDhjjksiIz3hgO3aZgja8MQ9KEcEddZpsitK0zXKW3K15x2wcTh51TZI82EqksyrXFgRzA/9vQ9PpNpltJ6P5zC/KxubVKrPxlfiguwqWoCD8UeC9qCkbFzTJKV4NdEMAu1dMvxXJ3+5eW90ZpmGaqsNVCJ2Mrdtj5Rn7iYWRgKESxBp4u2OqR+wr3/TGdWOtOv1lcIdSINkwPWiRsQ2+mwHXBT69LDu3JSwuIkdrwVuOSzoTYVVpxJVNEO8gXof/K4NX2ZyH/TusKrrdX1YElmpruzHxoU0mkznwCvSQFOb5lgcn2SjjgsHHVJpZ5xahxTNRSXTyGKc2ELG0iDoQSiytybgXhQy6u/Ae3KP9lhFYhTuLIVNwdFCV60N6By3pgUFRN7vQx9mizvyHNQ2xu97HhsG99ArrOCBgNuqF+fgxYVimC2GJDh1w/y+YobIXqvxqpvNZFlMRCkdCjvvWfR6ehEU8KDmA3vcE6/GFH4DpuekylmQJ95e/NYJ/k0VQZp67iT55+Bcrz6XwzW2Aeium7ijsrmSIPtdojZTZjJXHBgxLiHw/fn7gjIff68sjcylOCzGYZOfq+mDRrQUqYYdnII03qcZQS7uvz7iR4busIZi8jilEb/NMEmciPNCGcwwbitUJ3MlVjgUCul7wO79vO4dWGvzsnKln2gyzvyJaTbAOyhBZJcpCYi X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(136003)(396003)(39860400002)(376002)(346002)(451199018)(46966006)(40470700004)(36840700001)(36756003)(8936002)(5660300002)(1076003)(36860700001)(53546011)(82310400005)(7636003)(82740400003)(6666004)(16526019)(336012)(47076005)(83380400001)(426003)(6286002)(34020700004)(26005)(186003)(2616005)(86362001)(40480700001)(316002)(55016003)(40460700003)(41300700001)(70206006)(70586007)(54906003)(8676002)(4326008)(6916009)(7696005)(356005)(478600001)(966005)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:12:21.1993 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 114eb75a-00e9-483d-7aaf-08db1891f806 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6972 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 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/01/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=2e99d819d3a0890c9bb718f06891c6d8d080758c Thanks. Xueming Li --- >From 2e99d819d3a0890c9bb718f06891c6d8d080758c 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 Cc: Xueming Li [ 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 303275ae93..7adde16cbc 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1279,19 +1279,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; @@ -1533,7 +1522,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; @@ -1560,7 +1548,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; @@ -1571,15 +1558,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.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:44.186903300 +0800 +++ 0103-net-hns3-remove-useless-code-when-destroy-valid-RSS-.patch 2023-02-27 14:08:40.849237000 +0800 @@ -1 +1 @@ -From 546031ba551485c3e3aa57c3698975c2852cbef1 Mon Sep 17 00:00:00 2001 +From 2e99d819d3a0890c9bb718f06891c6d8d080758c Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 546031ba551485c3e3aa57c3698975c2852cbef1 ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -30 +32 @@ -index 4cca675c53..3809fcc2d7 100644 +index 303275ae93..7adde16cbc 100644