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 3ADDA457A1 for ; Mon, 12 Aug 2024 14:56:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36EC340669; Mon, 12 Aug 2024 14:56:55 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2071.outbound.protection.outlook.com [40.107.93.71]) by mails.dpdk.org (Postfix) with ESMTP id 88F314029C for ; Mon, 12 Aug 2024 14:56:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=akYj2tDMF9d6HZcyDCSrwjSuYZxP6stKRM+dEWGvmnM2TWzGUzeSLTJgT2eKroGaMvKRge8UzVSM6tl7lMywbQUhldBF1OnHu5+0elzXLATmqDtLyglhcQr8ora7UQZrPQkT2PkhNP2wrb4S0lSz7++R4vfDzOxVkW1VAZ3fsrQRrHlZJFP8aXMbtEJdoXzoKpjEHV8zvxfHvhOEtdQgB0r5R4VyepMfEemYMfDZCZ2cSoRRF4t2azUdUAf8BewqjNMKZ4CaVetO3iNN1ynwWIKcoEq/mIhRp6UYvCvHRSyLjl7icCQbyfiwGQOdsIJqczQiEnMwgfIAKzfyiouCxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=PMy80z8AfXe3wobh9MVNNaHGX+t/hVGWmv1+2fCezdM=; b=iOBeAxzV6Z453R75z7oP4vK5je6o8Th+9divWGLc+H2rTSdctqxVhABPjhVr6pQfDGF4DjLm+suAiHzETb8W4JQE2qmuMyTll07bcLjhhkMWz7pA9ev3kNgW4dlB614Uxpw0y7BBYX3lltIVbmzTnAcNs6/Qihe8HbBf8EqUtW4hva97N8pIQerdBlkdaHJKzBaftEV2qaCtgsLri0CdFYANMtjc3uaOUEPOe1SzWnoR/AeSSW6jXhs0V6HJXNsHaz65+O8ytT4wEgPbcAEmUMp3cv38t0rfoGCzTPmBFvXctKIiqfQlcTaYBCTHRTZeHyfegZmuyhr5T8VaJZobWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.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 (0) 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=PMy80z8AfXe3wobh9MVNNaHGX+t/hVGWmv1+2fCezdM=; b=CP7dotCpLLh+Vv7Gi8tSmYtFfPx37g1orJsC4e5NLbIlEJ14aY1GAX/Hfj0uoh+YwrDlFmiQUf93AUn6inVTN/75tyOfHidMAbRDdj7n5NyV00h6mHYuaY2TowaggUZ45uA2UuUSeO6Rdt3DVysMf/wZQmjFL1E5UYRaCwCRTQa4mrK9yWO1wBGAhSl3VwYaXg/DmvC5iPMTfZAQQbCPQU37Pr7oc1lp/8gj09xY47KxQfp7hB6QkmYMAyG464u6lkyI9UaLCpvGeV0XQ21s8RMmJZi3EDeOhmZFQofvzI3WwXDt8FJyxFNKw+7DUKpU/rRp8zC8ivhw6uFfsTddPA== Received: from DM5PR07CA0099.namprd07.prod.outlook.com (2603:10b6:4:ae::28) by CH3PR12MB7692.namprd12.prod.outlook.com (2603:10b6:610:145::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Mon, 12 Aug 2024 12:56:50 +0000 Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:4:ae:cafe::8a) by DM5PR07CA0099.outlook.office365.com (2603:10b6:4:ae::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22 via Frontend Transport; Mon, 12 Aug 2024 12:56:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.19 via Frontend Transport; Mon, 12 Aug 2024 12:56:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 12 Aug 2024 05:56:41 -0700 Received: from nvidia.com (10.126.231.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.1544.4; Mon, 12 Aug 2024 05:56:38 -0700 From: Xueming Li To: Yahui Cao CC: , Ian Stokes , Bruce Richardson , dpdk stable Subject: patch 'net/ice/base: fix masking when reading context' has been queued to stable release 23.11.2 Date: Mon, 12 Aug 2024 20:48:58 +0800 Message-ID: <20240812125035.389667-62-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240812125035.389667-1-xuemingl@nvidia.com> References: <20240712110153.309690-23-xuemingl@nvidia.com> <20240812125035.389667-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708E:EE_|CH3PR12MB7692:EE_ X-MS-Office365-Filtering-Correlation-Id: 7eb96aaf-2cbe-4088-64b8-08dcbace3b9b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?SLTHSM87reEqveIbN98hrUMmZ0o+cxj744f53imeiQsxfO21Dff4npAFIfQu?= =?us-ascii?Q?UV8/QUfsqOmWkeZkkfjyR3CDRzmciZf2u6Q+ywhr7ETIRtDXk16/kWufMmPy?= =?us-ascii?Q?e8Y/KNH9vGS8gbZa6dK8y5gymIMXMO/bNr6bt0BoyPF0DWN2O5i4k5+oHtVX?= =?us-ascii?Q?YB4NXIyHe9C0biupOoJTEm3WzgPBI/qazgbbZUU7H0+cOMXKT9tE1ARi/e+o?= =?us-ascii?Q?lnTISEEsUHP8kiILlpAbd52kCkgNRyQ4MXZGMvSfcZChEQeFq2c8ZMzgyYiZ?= =?us-ascii?Q?e/zyHz2gdAxZChyMNTTT3Mf0NXjQm3x7h6ESkx+ivRPk6sPmzALHHONhT9hN?= =?us-ascii?Q?+quK0mYxetBx/sGyMQ9PCSLySOkCuAQ+FEGT4HHLROdbBL8nbJj9aqytMtCW?= =?us-ascii?Q?SduBWLlMd96ri9wEWTIz5ed3rkBCViiVyJuidaP/uXUUbSfQfBIHWGD9lYwd?= =?us-ascii?Q?zVTKY/hKHcZQS9/5xnZ0iRN2NGavLFaJw37gGqWpnAbuaq06RZTGBdOUnkPm?= =?us-ascii?Q?ntfTY1/iC03zUGaeC+0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Ks7?= =?us-ascii?Q?KPW+9LMRcRKlCjafbVqDeF8d8MXuhAEV?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Aug 2024 12:56:50.4274 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7eb96aaf-2cbe-4088-64b8-08dcbace3b9b 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7692 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 23.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 08/14/24. 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=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=bd5b88d172021a010c131ea3ae3b1c8af919dc12 Thanks. Xueming Li --- >From bd5b88d172021a010c131ea3ae3b1c8af919dc12 Mon Sep 17 00:00:00 2001 From: Yahui Cao Date: Wed, 26 Jun 2024 12:42:14 +0100 Subject: [PATCH] net/ice/base: fix masking when reading context Cc: Xueming Li [ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ] No need to invert mask since we only reserve the masked bits instead of clear them. Fixes: a03c714bfe0b ("net/ice/base: add two helper functions") Signed-off-by: Yahui Cao Signed-off-by: Ian Stokes Acked-by: Bruce Richardson --- drivers/net/ice/base/ice_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index dcf008175e..7a50a0f9f0 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -4906,7 +4906,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA); - dest_byte &= ~(mask); + dest_byte &= mask; dest_byte >>= shift_width; @@ -4946,7 +4946,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) /* the data in the memory is stored as little endian so mask it * correctly */ - src_word &= ~(CPU_TO_LE16(mask)); + src_word &= CPU_TO_LE16(mask); /* get the data back into host order before shifting */ dest_word = LE16_TO_CPU(src_word); @@ -4997,7 +4997,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) /* the data in the memory is stored as little endian so mask it * correctly */ - src_dword &= ~(CPU_TO_LE32(mask)); + src_dword &= CPU_TO_LE32(mask); /* get the data back into host order before shifting */ dest_dword = LE32_TO_CPU(src_dword); @@ -5048,7 +5048,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) /* the data in the memory is stored as little endian so mask it * correctly */ - src_qword &= ~(CPU_TO_LE64(mask)); + src_qword &= CPU_TO_LE64(mask); /* get the data back into host order before shifting */ dest_qword = LE64_TO_CPU(src_qword); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-12 20:44:04.588939734 +0800 +++ 0061-net-ice-base-fix-masking-when-reading-context.patch 2024-08-12 20:44:02.135069302 +0800 @@ -1 +1 @@ -From 045ff68c49244d998933ef74a719b96db0e43988 Mon Sep 17 00:00:00 2001 +From bd5b88d172021a010c131ea3ae3b1c8af919dc12 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 045ff68c49244d998933ef74a719b96db0e43988 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index c14f66d55b..9a9c8f86e5 100644 +index dcf008175e..7a50a0f9f0 100644 @@ -23 +25 @@ -@@ -5014,7 +5014,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4906,7 +4906,7 @@ ice_read_byte(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) @@ -25 +27 @@ - ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_NONDMA_TO_NONDMA); + ice_memcpy(&dest_byte, src, sizeof(dest_byte), ICE_DMA_TO_NONDMA); @@ -32 +34 @@ -@@ -5054,7 +5054,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4946,7 +4946,7 @@ ice_read_word(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) @@ -41 +43 @@ -@@ -5105,7 +5105,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -4997,7 +4997,7 @@ ice_read_dword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) @@ -50 +52 @@ -@@ -5156,7 +5156,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) +@@ -5048,7 +5048,7 @@ ice_read_qword(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info)