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 D97A0428F8 for ; Sun, 9 Apr 2023 17:32:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D2AF940A80; Sun, 9 Apr 2023 17:32:35 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2082.outbound.protection.outlook.com [40.107.223.82]) by mails.dpdk.org (Postfix) with ESMTP id C2CDD41149 for ; Sun, 9 Apr 2023 17:32:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eogkCbov7gK2mQBczqyqT4bt6kuKweqLM2fEk8xmHbBGcs2HxdlgM1gUaauSsNqPA8vV9iTaLDJxULOkHvWTIXYFHGyoj5Y6sMs1HDYkRwUVUZp5wKVDX0Dxh+iCuOp2cF4FEJHF4gnbSbMtwO2g6OhQCTJyL68jZcFs/WO1X+shWDu174JwGqIGzYs2ucD6k0pAsLCimbMn78csoiiwFRpY1gCrv1qOJ+NpgBntx3iU4IHROW7lu5pg1qSNSXdv6svn2UGLoxLCWYyKaffw7TWX9ScQh6wLOaEUEhSgmGXcfGrGeYAHFDEQ6vqAIZp1C5Fzon2zyM900NfoHGLqvQ== 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=Y0XemNrYg7i9ZAWiJJTtaU02v/vpb2ots3QBiQr9lEc=; b=hbnk3lQ3ErKtCoqe3KB1WneVjYPMc2KtAubRrDZSOqQYAgMtNBytOmZw28qD2yfpaGvkrk8yDRXWGgPcBVBHJrLN1UOa4uXhTATlbhSLaZDYAwmVFsEv2o6AM5D9wAnYxgmwKZ8hVMocMEpiJ7v3+arFugR4giBA6J2ardO5iMeuAqzhDkDh6ktlBNrGOYpDRsiCS/mDvY5R9vT8IxT8AygrlZ3Fqn3ZwK/A0FHCV1UDJ+kkzevkWFsyRjmXd1zceKtVSWFMgst9T0yYAJZjWfqN6/Nj4MS+je1Pg77Q7CoAFBBG7oh+dbb6rFUjda3EMevqkRdQj6wmo51qrh/yuQ== 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=Y0XemNrYg7i9ZAWiJJTtaU02v/vpb2ots3QBiQr9lEc=; b=enZe3X5UXo8megRfgqI1/T4Zf4xGYaxOmjaXlIREgCemCbYsXgPLudVstWzXIf4SYtbqli7BZaKRusENzk2cRqZtMn9rRHlEabg0GFfFOcBPrWVtiFKf4mgTwIe4C0/+FCEDQnsBC8VY6mhNqbJcBlhm1MFw0VV7tQE9y+fGQeZy8LbHAD1MsvPwyFYNlUc57DjZw8C7OYug8T+7Jj7KWqKM/hWKzvsOfoXAxrxZf3KpEkJRfRWjkfwmwfcF6K3ORCawgnHww8nMl20JyG6lJYxjj8WjONSiQ9wDYK1OJTVFgoPzG0gBBb/08iyTbdDaEHiQlYUlFvd5xbE5Jfztyg== Received: from BN0PR04CA0102.namprd04.prod.outlook.com (2603:10b6:408:ec::17) by SA0PR12MB7477.namprd12.prod.outlook.com (2603:10b6:806:24b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.35; Sun, 9 Apr 2023 15:32:32 +0000 Received: from BN8NAM11FT048.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ec:cafe::bc) by BN0PR04CA0102.outlook.office365.com (2603:10b6:408:ec::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:32:31 +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 BN8NAM11FT048.mail.protection.outlook.com (10.13.177.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.25 via Frontend Transport; Sun, 9 Apr 2023 15:32:31 +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.5; Sun, 9 Apr 2023 08:32:15 -0700 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, 9 Apr 2023 08:32:13 -0700 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: separate setting redirection table' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:27 +0800 Message-ID: <20230409152529.5308-80-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-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: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT048:EE_|SA0PR12MB7477:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b671aa3-5c02-413e-660a-08db390fa260 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SoxZHjoeUUjrwdGxnZlwglKvdcWuNUL2VOZSmB6l7p3lFepEpUnU/ZVv7DMFbFZEYz1L6AgT1d+i6kl98aFShCdinAlL3un4jHM27psOQhNyDdDjBKdq87AEknPUXoKAqWn5RrpG4AFFqgDQQprN27WFzZF/eXCHuxV7DbvKXDvf5Zqn8eft0mMSZpt+E2tplG1mh6YyVxSs1cNR0wKM5K+R/EX3QfR8pvteOIaWUJrYzhVxkhKhskfsONx99bf3x+SgmVhL417YUoR3pJsOY4GvWAmlC4zWzstxNJe4Ak4ZmMVgEGHQGg3qUXWi6AUkqDRovxQc/64Xd4PyYFi9Rq0L87+DGMH8ebXrufH7QrI57KAHkxSX/A3jreQWweIiU8NuEF5sSgArZToAZNNwxq20s3Jw4X/N4RWnq9ie+aKkU5Uk88eqS3n5e7hbgeRPgZwzU8XImr6wF2DMr9nLv6v4PEbsnmuhIg2o4QoSY4F6Y5H4sKwtjHF0rYN2CJxU+AT/YlS7Bo4Gp4s6JLm+diuRSAPFxmecuKbNB34zJ8Sh49eS06VXXrqO2sgygWLg8GYm9qPI23xjQAb8G0B93KBQgR3em3d+CQK8UMjbkvGoATEe1TqNzdhSb4HEqv1edLZ+tDAIEt/GiAJWyzBkotXd/4hnRFAxf1adg1ImCtzJP+DVoTdBsGEuYVgADzxwfh+/+ckqcWmmB9OeaAvIx3s4QmvRGOJtTzcKN+9KtcGoQro5J6NcVo++KOSI7p75AqIKg2omVsn/nEoovEZc0ekBaTEHCoWphN+3k4eU9BF8y331qT9NkJ/7/Jxpq1lGUVYKFcqwivpOMgVtbYOblA== 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:(13230028)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199021)(36840700001)(40470700004)(46966006)(7696005)(478600001)(86362001)(55016003)(40480700001)(83380400001)(47076005)(36756003)(40460700003)(82740400003)(7636003)(356005)(2616005)(36860700001)(426003)(336012)(6666004)(966005)(2906002)(54906003)(316002)(16526019)(6286002)(186003)(1076003)(53546011)(26005)(8676002)(6916009)(41300700001)(8936002)(5660300002)(82310400005)(4326008)(70586007)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:32:31.2545 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b671aa3-5c02-413e-660a-08db390fa260 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: BN8NAM11FT048.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7477 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 04/11/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/log/?h=22.11-staging/commit/3b85ef547e6dfaf7d3d8a048222f218403778bda Thanks. Xueming Li --- >From 3b85ef547e6dfaf7d3d8a048222f218403778bda Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:10 +0800 Subject: [PATCH] net/hns3: separate setting redirection table Cc: Xueming Li [ upstream commit a421cb93462932717f23c5d8342381726e547ba6 ] The settings of redirection table comes from the ethdev ops (like, dev_configure and rss_hash_update) and rte_flow API. For the ethdev ops, driver has to save it to rss_info::rss_indirection_tbl in hns3_hw structure so as to it can be restored when reset is triggered. While rte_flow API no need to use this field to save, they has a global RSS flow list to maintain all rules which can be used to restore the table during the reset phase. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_flow.c | 2 -- drivers/net/hns3/hns3_rss.c | 21 +++++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index 0cb6914982..875c0eec11 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1519,8 +1519,6 @@ hns3_update_indir_table(struct hns3_hw *hw, uint32_t i; /* Fill in redirection table */ - memcpy(indir_tbl, hw->rss_info.rss_indirection_tbl, - sizeof(hw->rss_info.rss_indirection_tbl)); for (i = 0, j = 0; i < hw->rss_ind_tbl_size; i++, j++) { j %= num; if (conf->queue[j] >= hw->alloc_rss_size) { diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index 401e3adfdf..751033d98f 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -473,10 +473,6 @@ hns3_set_rss_indir_table(struct hns3_hw *hw, uint16_t *indir, uint16_t size) } } - /* Update redirection table of hw */ - memcpy(hw->rss_info.rss_indirection_tbl, indir, - sizeof(uint16_t) * size); - return 0; } @@ -542,8 +538,11 @@ hns3_rss_reset_indir_table(struct hns3_hw *hw) } ret = hns3_set_rss_indir_table(hw, lut, hw->rss_ind_tbl_size); - if (ret) - hns3_err(hw, "RSS uninit indir table failed: %d", ret); + if (ret != 0) + hns3_err(hw, "RSS uninit indir table failed, ret = %d.", ret); + else + memcpy(hw->rss_info.rss_indirection_tbl, lut, + sizeof(uint16_t) * hw->rss_ind_tbl_size); rte_free(lut); return ret; @@ -855,12 +854,12 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev, idx = i / RTE_ETH_RETA_GROUP_SIZE; shift = i % RTE_ETH_RETA_GROUP_SIZE; if (reta_conf[idx].reta[shift] >= hw->alloc_rss_size) { - rte_spinlock_unlock(&hw->lock); hns3_err(hw, "queue id(%u) set to redirection table " "exceeds queue number(%u) allocated to a TC", reta_conf[idx].reta[shift], hw->alloc_rss_size); - return -EINVAL; + ret = -EINVAL; + goto out; } if (reta_conf[idx].mask & (1ULL << shift)) @@ -869,7 +868,13 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev, ret = hns3_set_rss_indir_table(hw, indirection_tbl, hw->rss_ind_tbl_size); + if (ret != 0) + goto out; + memcpy(rss_cfg->rss_indirection_tbl, indirection_tbl, + sizeof(uint16_t) * hw->rss_ind_tbl_size); + +out: rte_spinlock_unlock(&hw->lock); return ret; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.801317000 +0800 +++ 0079-net-hns3-separate-setting-redirection-table.patch 2023-04-09 21:45:38.689042200 +0800 @@ -1 +1 @@ -From a421cb93462932717f23c5d8342381726e547ba6 Mon Sep 17 00:00:00 2001 +From 3b85ef547e6dfaf7d3d8a048222f218403778bda Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a421cb93462932717f23c5d8342381726e547ba6 ] @@ -14,2 +16,0 @@ -Cc: stable@dpdk.org - @@ -24 +25 @@ -index 2faeb9ca52..d5db09a263 100644 +index 0cb6914982..875c0eec11 100644