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 7C3AAA0543 for ; Tue, 21 Jun 2022 10:06:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76D3340151; Tue, 21 Jun 2022 10:06:29 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2084.outbound.protection.outlook.com [40.107.244.84]) by mails.dpdk.org (Postfix) with ESMTP id 9FA4942820 for ; Tue, 21 Jun 2022 10:06:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ltktxh38Enl1vcRAtWvla122+tvqy4tE1xB3bhgmkSjcvNDwpOCS8sl9U7dAWwSor1bkbtlrBrM3cbQbKhgWbDTFRXgcFmksXdSen0uEk1bFOygbWCaU2yUhI7f/2SRPFRAnQvcNC+qP27TSUPax1zh/ahyVycFrL8RCUHj2U18PD6Ryb5vO1W/GPsx35TERuZnqnWJNDDPm8h06QTSonCGWwmU3CuEIdCr8GLTOExgw8fgLXnJzYTQHziQOmTB1eI/DH2MhM+PHEErAOnvDd60cPW0fANpm0X1BTQIcIrK1tThz/AdpmnKuhNLk0Aj3okZy1Zqfo7imnXbmtQDxnA== 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=83oxAVjSegFJCdiBWmmNke4g27i3HM0PT5YEEjYqeZc=; b=fgTNUpvX35uTQkmrGtDjVTc3IGYH+5y/VoTOjy1oU2NghYTq39OJVuvxba/qV1eEe4xZB7CDp7zIfxqik4w4byuv5R+dQJy4AeXsUB5bpYUlaYnVwVs7aPM0EPiz0SxxT5oCnle9k52N9Y0Ibs4Y3TLWj+3fwkfMzY6Chu5a687zBRbAlyaiLxVcLmQ3gjtE1BrocWTL3zJF83XbwiPLAEQamcsTqMhYh1W0CTiTYybLWEDPdKpJ+Au4Xn6OyM5C7RFtGbeyqQJYAdUOE25N0LGF9qqnJYEuSN6xpwelx3kf2zAyGQTHn07gkZjXTR5Y36Snp1YWYAe4UbTD90J7ig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=dpdk.org 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=83oxAVjSegFJCdiBWmmNke4g27i3HM0PT5YEEjYqeZc=; b=J+QMxcVYG/BxHj9R7B7wYg+QYUeZMq2gkfy+sL8DjUa7PQOOfxTjINDr36OF0apzj7uxq0UneXwpOpBR87KfceFEbsG133NYnXjOhAkpaqEzaVnUI6p0cxLn+7m968vUwW5uwXRjFPrUsDCOvs1x3YHGg03BfEkiPXRahEBEaO0Y8Li489UnzSdLnqhMUtzcZWeDdffRZb9qFEutzqHm6teC3yutAsnGkpK2Szo7H64q7fQkCZr0VxhOCRl4RElkG5iTMQvpssIxZAat6FAz2MNe4Dbn4rKlu6PjCr9kUjnCuKIehLMgJq3X+cC/KyTm6wVy+cZZGwpPBdQ+l7ehLg== Received: from MW4PR03CA0138.namprd03.prod.outlook.com (2603:10b6:303:8c::23) by DM6PR12MB4944.namprd12.prod.outlook.com (2603:10b6:5:1ba::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:06:26 +0000 Received: from CO1NAM11FT019.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8c:cafe::db) by MW4PR03CA0138.outlook.office365.com (2603:10b6:303:8c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18 via Frontend Transport; Tue, 21 Jun 2022 08:06:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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 12.22.5.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT019.mail.protection.outlook.com (10.13.175.57) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:06:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:06:25 +0000 Received: from nvidia.com (10.126.230.35) 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.22; Tue, 21 Jun 2022 01:06:23 -0700 From: Xueming Li To: Huisong Li CC: Min Hu , dpdk stable Subject: patch 'net/hns3: remove redundant RSS tuple field' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:45 +0300 Message-ID: <20220621080301.2315720-40-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] 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-Office365-Filtering-Correlation-Id: 754249a1-10a0-49bf-dda4-08da535cf00b X-MS-TrafficTypeDiagnostic: DM6PR12MB4944:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fm9JzneK39pehTW6Hh1ZxCi7O2GyMhRRdzRGSeSa3MnqZz64tsPdb6PBR6npdCEJWmC/zDlmGYf4/9IU+aplTsZ/N1UMv0dnUij3PbDgdMG3nOjOkBW+d5v8y61mb3FEP1PxssJqX9MyLKQiftlLaMTaXdvpAgCg1GDM8Q44SjKdjLIpniaHvpi1vuun1IyaeqXE2vRiw2mNRS2Pcr5pHOk78V6CTndv4LqdlnZyOQMr1OE6pXd0nQ3c1WCeZ9lRUB/Z6sbBmC/6H5n0SNrGv+PA3fXfLq8v2Qbk6iEVl5hfOki29vFoRp/IaJgAfZnJvjGfootkOLaA5SPsMIAS04UtGf9Q/I74vBszlJM1BQY1oq6QNeam6SZ//ms8MffOlCnpJqE8y4BQyFBVogKqPSLLXRDVpNOFkXEuR6Z962Q1SIeMCBNp9LykdCOGUtFnwDNjN8SqumfADWtDnAR+9T57pmY/BF+WGqW5QEKawSwoH2/JMnfBcZXbOfQ1GOSt6RbEO0tpi280IsFqHhSzItQQaWkpeXHWU6TGrKt+SffYPSsZ8pXPeQegFWIs48nTGP1mC5jFD8oV1BdRITHOXze+33aSr+jM/q/EW1+Z8c0m5vAu/GqCM75LbjCt7MTEOA4SH64/XV0L8xGQ3X58U1WB5TKoWCBYB+Z3gqJ8xGtftktUvzrxDwBZXEKKa4UGzTjEQtcHRc/r0Y4MbVl8lEyou/+lY8MHc5ZYfqIk6t2jEWPc/tSLhXQAfGLMeOc1woKpa7d0NlA8Fg5m/no2jz99alR7AmaF0TVUS6ci/Ixb9GwtKg8Z9vg+tkRs+8JJFLs6BRgOZxlk7T+yBVgHkH6X0sKcd5vtM3SS47ZU8ow= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(376002)(396003)(39860400002)(136003)(46966006)(40470700004)(36840700001)(54906003)(6916009)(55016003)(8936002)(336012)(426003)(966005)(36756003)(47076005)(478600001)(2616005)(40460700003)(316002)(40480700001)(41300700001)(36860700001)(1076003)(7696005)(83380400001)(86362001)(6666004)(53546011)(81166007)(5660300002)(6286002)(82740400003)(8676002)(70206006)(70586007)(4326008)(16526019)(2906002)(356005)(82310400005)(186003)(26005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:06:25.4658 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 754249a1-10a0-49bf-dda4-08da535cf00b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT019.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4944 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/21c2dd60110b93d9c3bceb35bb9ae8f9610a3edd Thanks. Xueming Li --- >From 21c2dd60110b93d9c3bceb35bb9ae8f9610a3edd Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Thu, 5 May 2022 20:27:07 +0800 Subject: [PATCH] net/hns3: remove redundant RSS tuple field Cc: Xueming Li [ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ] The 'rss_tuple_fields' in struct struct hns3_rss_conf::rss_tuple_sets is redundant. Because the enabled RSS tuple in PMD is already managed by the 'types' in struct hns3_rss_conf::conf. This patch removes this redundant variable. Fixes: c37ca66f2b27 ("net/hns3: support RSS") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_flow.c | 6 ++---- drivers/net/hns3/hns3_rss.c | 12 ++++-------- drivers/net/hns3/hns3_rss.h | 5 +---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 703e96e6fa..3fbaa5f1c5 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1413,7 +1413,7 @@ hns3_disable_rss(struct hns3_hw *hw) { int ret; - ret = hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, 0); + ret = hns3_set_rss_tuple_by_rss_hf(hw, 0); if (ret) return ret; hw->rss_dis_flag = true; @@ -1463,7 +1463,6 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func, static int hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) { - struct hns3_rss_tuple_cfg *tuple; int ret; hns3_parse_rss_key(hw, rss_config); @@ -1479,8 +1478,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) hw->rss_info.conf.func = rss_config->func; - tuple = &hw->rss_info.rss_tuple_sets; - ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_config->types); + ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_config->types); if (ret) hns3_err(hw, "Update RSS tuples by rss hf failed %d", ret); diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index df25a33e06..e38de80eec 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -310,8 +310,7 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw) } int -hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, - struct hns3_rss_tuple_cfg *tuple, uint64_t rss_hf) +hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf) { struct hns3_rss_input_tuple_cmd *req; struct hns3_cmd_desc desc; @@ -356,7 +355,6 @@ hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, return ret; } - tuple->rss_tuple_fields = rte_le_to_cpu_64(req->tuple_field); /* Update supported flow types when set tuple success */ hw->rss_info.conf.types = rss_hf; @@ -377,7 +375,6 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, struct rte_eth_rss_conf *rss_conf) { struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private); - struct hns3_rss_tuple_cfg *tuple = &hw->rss_info.rss_tuple_sets; uint64_t rss_hf_bk = hw->rss_info.conf.types; uint8_t key_len = rss_conf->rss_key_len; uint64_t rss_hf = rss_conf->rss_hf; @@ -394,7 +391,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, } rte_spinlock_lock(&hw->lock); - ret = hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf); + ret = hns3_set_rss_tuple_by_rss_hf(hw, rss_hf); if (ret) goto set_tuple_fail; @@ -408,7 +405,7 @@ hns3_dev_rss_hash_update(struct rte_eth_dev *dev, return 0; set_algo_key_fail: - (void)hns3_set_rss_tuple_by_rss_hf(hw, tuple, rss_hf_bk); + (void)hns3_set_rss_tuple_by_rss_hf(hw, rss_hf_bk); set_tuple_fail: rte_spinlock_unlock(&hw->lock); return ret; @@ -704,8 +701,7 @@ hns3_config_rss(struct hns3_adapter *hns) !(rss_hf & HNS3_ETH_RSS_SUPPORT)) rss_hf = 0; - return hns3_set_rss_tuple_by_rss_hf(hw, &hw->rss_info.rss_tuple_sets, - rss_hf); + return hns3_set_rss_tuple_by_rss_hf(hw, rss_hf); } /* diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h index 6f61541387..685d76491e 100644 --- a/drivers/net/hns3/hns3_rss.h +++ b/drivers/net/hns3/hns3_rss.h @@ -43,7 +43,6 @@ struct hns3_rss_conf { struct rte_flow_action_rss conf; uint8_t hash_algo; /* hash function type defined by hardware */ uint8_t key[HNS3_RSS_KEY_SIZE]; /* Hash key */ - struct hns3_rss_tuple_cfg rss_tuple_sets; uint16_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE_MAX]; uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */ bool valid; /* check if RSS rule is valid */ @@ -107,9 +106,7 @@ int hns3_set_rss_indir_table(struct hns3_hw *hw, uint16_t *indir, int hns3_rss_reset_indir_table(struct hns3_hw *hw); int hns3_config_rss(struct hns3_adapter *hns); void hns3_rss_uninit(struct hns3_adapter *hns); -int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, - struct hns3_rss_tuple_cfg *tuple, - uint64_t rss_hf); +int hns3_set_rss_tuple_by_rss_hf(struct hns3_hw *hw, uint64_t rss_hf); int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key); int hns3_restore_rss_filter(struct rte_eth_dev *dev); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.091614632 +0800 +++ 0039-net-hns3-remove-redundant-RSS-tuple-field.patch 2022-06-21 15:37:49.024451205 +0800 @@ -1 +1 @@ -From bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e Mon Sep 17 00:00:00 2001 +From 21c2dd60110b93d9c3bceb35bb9ae8f9610a3edd Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit bfd0b54dc84f06183c8a13f75539f0f1dacb3c3e ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index feabac9f41..317f91fc71 100644 +index 703e96e6fa..3fbaa5f1c5 100644 @@ -26 +28 @@ -@@ -1446,7 +1446,7 @@ hns3_disable_rss(struct hns3_hw *hw) +@@ -1413,7 +1413,7 @@ hns3_disable_rss(struct hns3_hw *hw) @@ -35 +37 @@ -@@ -1496,7 +1496,6 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func, +@@ -1463,7 +1463,6 @@ hns3_parse_rss_algorithm(struct hns3_hw *hw, enum rte_eth_hash_function *func, @@ -42,2 +44,2 @@ - hns3_adjust_rss_key(hw, rss_config); -@@ -1512,8 +1511,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) + hns3_parse_rss_key(hw, rss_config); +@@ -1479,8 +1478,7 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config) @@ -54 +56 @@ -index 4b2c24ace4..e149c16bfe 100644 +index df25a33e06..e38de80eec 100644 @@ -101 +103 @@ -@@ -699,8 +696,7 @@ hns3_config_rss(struct hns3_adapter *hns) +@@ -704,8 +701,7 @@ hns3_config_rss(struct hns3_adapter *hns) @@ -112 +114 @@ -index c4121207aa..55d5718ffc 100644 +index 6f61541387..685d76491e 100644 @@ -131 +133 @@ - int hns3_rss_set_algo_key(struct hns3_hw *hw, const uint8_t *key); + int hns3_set_rss_algo_key(struct hns3_hw *hw, const uint8_t *key);