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 66749428F8 for ; Sun, 9 Apr 2023 17:31:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 613C642B71; Sun, 9 Apr 2023 17:31:58 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2052.outbound.protection.outlook.com [40.107.243.52]) by mails.dpdk.org (Postfix) with ESMTP id 6D27C42B8E for ; Sun, 9 Apr 2023 17:31:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cfGht6HnGgZoJPq2mwQe86k/5GFBN7N5lxZ7jtBB4NfOslNX8YxThJdNmXPLVBRhO6/r/EUEauGGZNixe1c6AaEkyxfMC5nXKHv1zVobf3CpAhB7j0IgQD+4ahHYpoDiVzn1RbB3jIBLWNYDIuALdQ03ltfwyylnLCJGEEoYBvhNuGVMSXx0HXQSs39fIiB0qWrYHvKPRgetFjL1h4T9AgSiqD6L7uEsWXffY9gsNHABaZ69ajhf1Goe8cTwCxGC0KJ4rd6M1+2/Vu77dELgKQrZ1FCTT/r06isFpp5iIDIGjXZnuohda75Mvditkhm80P2aVYjgHsyC0TUBljmfCw== 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=SpPH1+2etgoZnBIvtcPkBb68uJl5ZKxSlY4CWkdiPGw=; b=X9bwGdXcWPXvnQwKwHO22nFGi7FqJB9qbQXvVJBpcIVAEQMsqNGgC3r/YN9OxGyg3EEjBPc6LeFUKmh3zzz0FnKfVBSe1geRQs2rDi6FoS832iYZxc63UZMvLcjYgWxBs3NPiyKwqRgVMhTjF5itn5CJJnpXW7St29xJ6uVjbXc1qDI9ZWVaDTdlAClacoJlDlrzAmm6DqkpeMALmPoGm0b3+JdE7FHsLikFTaAc49vbPYEQFqGUat7rTst0hICzPyKQaHr2HBsoo7ruPncrgRB60YclDgQ1WWGmm6Se08/B8tmrJtbSZYdcBn3Xi1nAlg041Lgu/9NHUdWNgXYwjQ== 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=SpPH1+2etgoZnBIvtcPkBb68uJl5ZKxSlY4CWkdiPGw=; b=gbPhKT5WONKzkKN79lmARnEvf+2gvQYpyHcP03DNuDbefPLqiDXSG3Z6SKlN3MxAxmKdz18IIpFxByKCVLqTr8dU2tZe6Yw9BVWmHck67jBp6J+Xxnev2aUlQYpcG9O3Jo1jYSoRSw7Obh/9liLbLyWipeWvEgMKZmXLhK427OlDJB2x1XJS/HkDFOtgsnDcTC6+K83h6XllLxI/dX0hTtLrVmS4SU4jLUMZz9yFrR/s3ZN9teDcvaWkZkMewxtKMINslmOB1I6RPx+DsLgE442WjqhnS330LmL/xFgZnE6zCUI2GXi1kXPbBKN+pL5JmwNm4haxT0Dl59jpxTsNZQ== Received: from DS7PR07CA0007.namprd07.prod.outlook.com (2603:10b6:5:3af::25) by CH3PR12MB7716.namprd12.prod.outlook.com (2603:10b6:610:145::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.35; Sun, 9 Apr 2023 15:31:52 +0000 Received: from DM6NAM11FT097.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3af:cafe::3b) by DS7PR07CA0007.outlook.office365.com (2603:10b6:5:3af::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36 via Frontend Transport; Sun, 9 Apr 2023 15:31:52 +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 DM6NAM11FT097.mail.protection.outlook.com (10.13.172.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.20 via Frontend Transport; Sun, 9 Apr 2023 15:31:51 +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:31:45 -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:31:44 -0700 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: fix possible truncation of hash key when config' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:24:20 +0800 Message-ID: <20230409152529.5308-73-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: DM6NAM11FT097:EE_|CH3PR12MB7716:EE_ X-MS-Office365-Filtering-Correlation-Id: 079fd1c4-9fc4-4a2e-0595-08db390f8adf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cLZg6aiE5EpBFWHCELeczQbjiu8V2THBfBfvrhr48iKUitLNPJdMKetagh3YBimJk78+mF10j3BTwDR6XKcsdPDm4fR+5/oVR05qH3BaBSm5UsiKqVTwBusuwDoU61bTYip9BMFxEiHT9BXqVMcVL/5wolHreaGvypl4khh09qqmbOPZBh6VGmRaq1ZrAruv/F1TK/84TgPgD42iuzMGzPs+819z/6ROtGKszRgm8bC9ZlrL5BUUFZMl4VpEJOkU1DoS3QEewgUdzBOnY2kPdtVDJk+ozFYIlWPxjjhU333+ovCjCUxMftCNL+US7C9/ltF1OKewCDJXfAQPgBukANniJw1c6M+DrRW4ATKXPoUrvmFh5Sfy3PRlzDR+RmTFi2Lyce8AFKGJjwrjGqyeLImQjCWCcJte8m9VH2y2EnZDS34wFLSjbD66OmAeJMywH+U0g1PZ6v3DwGeTKmUpS7YXI5mZJ26e3rGP5J+/pnYirfvmmQdno25bULh+cpv1d3LMt6eA5pWBCxc7vd+wEhyW6sDsXGzqeSon+Wftvku9EkbX9f41UIuUcdiQITvriCkOiI6WtKXl8vTwd2k1ifvcyXm5WK64+x+kU8b5tt6VDtkzqAviRENlSax85rnjUdaM2Z7UFZK6k7rz57ffnzdNXmGbLqpNVHI1FZKTJbfB3O+lBE28L24cXU2Sj55iJD0b2A8lEhjD/tykQkZcMxlFcXsyOVRBlbRB795pqG6M6Y3dbGW23ARXJgWCAwmc/66bWoPZ6BEcFNlnIf7bDOuOf4ePSuvnbzPVfQ6oEJxyOxESFi40svFKfnjbG3+MS5JvhjqXBZFFO4jdJpD18w== 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)(376002)(136003)(396003)(346002)(39860400002)(451199021)(46966006)(40470700004)(36840700001)(2906002)(82740400003)(47076005)(86362001)(5660300002)(426003)(336012)(36756003)(83380400001)(6916009)(40460700003)(41300700001)(70206006)(186003)(316002)(54906003)(478600001)(7696005)(55016003)(8676002)(40480700001)(4326008)(70586007)(356005)(7636003)(82310400005)(966005)(1076003)(2616005)(26005)(8936002)(53546011)(6666004)(6286002)(16526019)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:31:51.8659 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 079fd1c4-9fc4-4a2e-0595-08db390f8adf 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: DM6NAM11FT097.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7716 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/81fbc0298c062e88ba596d12cd77f6748967ff47 Thanks. Xueming Li --- >From 81fbc0298c062e88ba596d12cd77f6748967ff47 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Fri, 10 Mar 2023 17:35:03 +0800 Subject: [PATCH] net/hns3: fix possible truncation of hash key when config Cc: Xueming Li [ upstream commit bb38316e738ad6009b3f20b3abfaf27ea8cb0202 ] The hash key length of hns3 driver is obtained from firmware. If the length is a multiple of HNS3_RSS_HASH_KEY_NUM (16), the last part of hash key will be truncated. Fixes: 88347111eb53 ("net/hns3: refactor set RSS hash algorithm and key interface") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rss.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c index d6e0754273..2011c18b9b 100644 --- a/drivers/net/hns3/hns3_rss.c +++ b/drivers/net/hns3/hns3_rss.c @@ -301,7 +301,8 @@ hns3_rss_set_algo_key(struct hns3_hw *hw, uint8_t hash_algo, req->hash_config |= (hash_algo & HNS3_RSS_HASH_ALGO_MASK); req->hash_config |= (idx << HNS3_RSS_HASH_KEY_OFFSET_B); - if (idx == max_bd_num - 1) + if (idx == max_bd_num - 1 && + (key_len % HNS3_RSS_HASH_KEY_NUM) != 0) cur_key_size = key_len % HNS3_RSS_HASH_KEY_NUM; else cur_key_size = HNS3_RSS_HASH_KEY_NUM; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.618902300 +0800 +++ 0072-net-hns3-fix-possible-truncation-of-hash-key-when-co.patch 2023-04-09 21:45:38.689042200 +0800 @@ -1 +1 @@ -From bb38316e738ad6009b3f20b3abfaf27ea8cb0202 Mon Sep 17 00:00:00 2001 +From 81fbc0298c062e88ba596d12cd77f6748967ff47 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit bb38316e738ad6009b3f20b3abfaf27ea8cb0202 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org