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 6C46045CE3 for ; Mon, 11 Nov 2024 07:37:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64DCC4067A; Mon, 11 Nov 2024 07:37:45 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2072.outbound.protection.outlook.com [40.107.92.72]) by mails.dpdk.org (Postfix) with ESMTP id 32A8F40E1B for ; Mon, 11 Nov 2024 07:37:43 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GV+HIlNDzwl3Bj9B7FDeQwH9BuisFo411u78WOUkWakfCerF0ITXtm1kWGO2okQgD9NyXPwdIZQf37Y6TYnTmT1RzWNTTeNN+yNMyC+zU67GNGIJTM8XAKN5B/9UEKAEV8ludUfmhvpmnEL2nxK7Vhf9Etlckmqq6XJMrJvpADqHYTNX9u/4V+36Kigtl5IiMqwzxf55SED569nFOGk/kRRKZb/K1Qx0/eY6sWvL3GNl+jVcut1+twBACgyLqNVe96qFSCgCirCFjcMS8MpAd5fsryIiZQWcne4G4afzCY2n3bjpZyRFzp5pEMgAWDomlZjs3DcJOp7/A80d6NGpGQ== 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=LrJ6FCK0l/acr3NtAA7ezkkwaUr7hZN1EbBko+BaPQs=; b=CmfhkSGM2a1TA3T5aBtg27RVwRMwtqD430LxfJE1ZxwZY5JsPXRSYm5yBvARi9A0dA+re2eYYbo6YjUCkASLmziMo4qjpaACqgqOmgjj6HMuOafqRZ57piQSFJltRIO2xnyPr6/D8FMkLh6QXftXauvz53dEoeQZB3qyW18IIEgOgeVxTROkYEmJk/LB7t9OsLKbLtT8AA48XIZZRv6XlZ/d22KGKC/MfU0WXbATZsznOvsNdXV3K65PT2BDvEx2P4RfV57VsceJpKiB3zf6zo1+7j7E5ty/58Wk0GoPcvXdwlpEmRp1huV/HPZibvs/a+UY7RF+Pqs+9YtGRXQZ5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=nxp.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=LrJ6FCK0l/acr3NtAA7ezkkwaUr7hZN1EbBko+BaPQs=; b=SgfxX/BFe0AgpFR04dVYKVtKnsHw8Q7EEWZw0tBt/86Xo3nkJaHmDkStnIWu3cy2/8ZaKYAjCYABk5hp/QYDuwJRo/v34IBVQqGKzW9SWFLz79q+LswQFQj2pLDumSsh1UPRtpUFWA6Se0R8UpLnN7b3C29l+LiHLdSRQBW9q8f3P6Mok5SuSeawzj5TwVeGAE8i3IETkau6qyEs9jhD8EJx+rIVY9Sq9VtA27zeKdQWqxryAJMtezgHJbTjwLk81eUGv13kj+jfT6D4eYyO3EXCMoa9HIHYv9G5MS9Wt46AeYp04icKwvz8qTTNY3uzQirjSVWX4zqCc2lkhyV8ig== Received: from SN7PR04CA0044.namprd04.prod.outlook.com (2603:10b6:806:120::19) by SA1PR12MB7366.namprd12.prod.outlook.com (2603:10b6:806:2b3::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.26; Mon, 11 Nov 2024 06:37:40 +0000 Received: from SN1PEPF00026369.namprd02.prod.outlook.com (2603:10b6:806:120:cafe::7e) by SN7PR04CA0044.outlook.office365.com (2603:10b6:806:120::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28 via Frontend Transport; Mon, 11 Nov 2024 06:37:40 +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 SN1PEPF00026369.mail.protection.outlook.com (10.167.241.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:37:40 +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.1544.4; Sun, 10 Nov 2024 22:37:30 -0800 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.1544.4; Sun, 10 Nov 2024 22:37:28 -0800 From: Xueming Li To: Rohit Raj CC: , Hemant Agrawal , "dpdk stable" Subject: patch 'net/dpaa: fix typecasting channel ID' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:28:10 +0800 Message-ID: <20241111062847.216344-85-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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-TrafficTypeDiagnostic: SN1PEPF00026369:EE_|SA1PR12MB7366:EE_ X-MS-Office365-Filtering-Correlation-Id: b44664eb-33a3-41f3-49b0-08dd021b571b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GayZz2CmRhtE4vZuZMUpoi2cVG56ricPEmUQDrRNME8dSwC4PV3nS1Cnj9yW?= =?us-ascii?Q?iXYV8ZrLKPjVY4150zIyS1TG5Q3n9dUXHDmw/4AdjzAIeJb+2nfhyJgdErZM?= =?us-ascii?Q?sN3fFAMTdClOWsE3D/HiX1lJcHpycC4Imz5ZukZBKAIz5AgmCv8uC5e4xjgc?= =?us-ascii?Q?Ig5eWF14IwvIc5Dko8+260VEb9I5LEY/C7n6NsHVNg6XMrLYmkZkE9VHLEIm?= =?us-ascii?Q?8S6j8Thj4fAHayaGEOjQVWdPPPmrVq7jgeig06BbW7hyl7+4rnKYFsUetScY?= =?us-ascii?Q?JxBDkGveXCdmJzKyaPQNfrsFL8qtZZlzukviHR+xvv493Hirlp1QSjj1nroG?= =?us-ascii?Q?iAPRQNKR54gOHH7hxjN+OYC3RrsHaHrV/S356nVtgS9dBRCNyuSMBzVw2WjG?= =?us-ascii?Q?l3tC3kHkGDxbCm1WedL/nxh8+22qrobI3GqXhNvbzXrxDHJ5aH1Rpby771Sp?= =?us-ascii?Q?OSyc5mhqJ61v0W3IHMdmW+Id7A3YgGHf3H+DVGAKLyIXZwb2v4FHMWF02Ud4?= =?us-ascii?Q?GFUbHl/jLZwjtp5kRhJANJMAch+QklPqvMTcmMPXMglLCozoWOdKgRJ7mpSS?= =?us-ascii?Q?rMYeglUalU5NAKpb0KZXxGXRjwHqFZFfc0m8+EkiG58EWkTN6jfY3To98FLE?= =?us-ascii?Q?ruxbszDLMRJSK8PFr10g9/RSGrrKbhqZJ7hEuewSUFc4rSoOBf1uKuEe0mJm?= =?us-ascii?Q?DXF6MTvk3bk4NOy1cmBF44kbLvY6vxslhREDKkZ4AY7Zu80KM0lD81hUFuXj?= =?us-ascii?Q?jltfvspbsH1TMAQuUkgKyCwbzjjwO2opef3Hi5vlVWxci6H5QARgOmmyKion?= =?us-ascii?Q?5OUrO1YXH8OzXW8X9aIqjy6SG+6/qS9F3Dq46d/tsznDFQONhOgcZDBZIxiB?= =?us-ascii?Q?ZRhYuOtfsuFfYIYENU0Ihk1fVS5sJHLoO0eXpLnxVKqcKrbowAcRAwldTEjj?= =?us-ascii?Q?L6biS8wiXDutiVr8u2EBF1ZB4is/Aib+BOIB2MEya2pvUxV00xJYroQ1Qaw2?= =?us-ascii?Q?9J3cwA5LTOCX1QyXelNK9RsFrQkP1/9/TlaPiWtquSwiGcA2xsrXkNkVnfbG?= =?us-ascii?Q?v3CK6SnDZC4HjS+WIDxzcPTPWyB3TjF68+AN4BXTnjBr85rCe1shTdMln3LK?= =?us-ascii?Q?Z/P8ESUBqAuvonUpPoWu5yrMIvef6IrqMJigg0+AfhB4KSE1j3ZZddMCZBa+?= =?us-ascii?Q?P46EUmHpFoImnsv7NvbRljZHmF8cV9552SR+fqjBZqb/yl4uX+HNtaeKcjs7?= =?us-ascii?Q?w6QrEespBC2Ov89DlACCeQ/YFLoN5H8HoCXiY+9HoQV/ISNv4vSLjT1ANxPR?= =?us-ascii?Q?By/XSbyD9EedWtHbjqUn7ya6rS7atjddM9JEZ4kWXqrH06b4Z3WUHh6ttW5u?= =?us-ascii?Q?Xo4YqycpPgAtSHEEGPKgX3B9If2I1xYY0RbhPT8y9b24WxCuxg=3D=3D?= 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:(13230040)(36860700013)(82310400026)(376014)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:37:40.4319 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b44664eb-33a3-41f3-49b0-08dd021b571b 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: SN1PEPF00026369.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7366 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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=9a1711950ed89b16332f4cc6e378de7269815ff6 Thanks. Xueming Li --- >From 9a1711950ed89b16332f4cc6e378de7269815ff6 Mon Sep 17 00:00:00 2001 From: Rohit Raj Date: Tue, 1 Oct 2024 16:33:09 +0530 Subject: [PATCH] net/dpaa: fix typecasting channel ID Cc: Xueming Li [ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ] Avoid typecasting ch_id to u32 and passing it to another API since it can corrupt other data. Instead, create new u32 variable and typecast it back to u16 after it gets updated by the API. Fixes: 0c504f6950b6 ("net/dpaa: support push mode") Signed-off-by: Rohit Raj Acked-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index bcb28f33ee..6fdbe80334 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, struct fman_if *fif = dev->process_private; struct qman_fq *rxq = &dpaa_intf->rx_queues[queue_idx]; struct qm_mcc_initfq opts = {0}; - u32 flags = 0; + u32 ch_id, flags = 0; int ret; u32 buffsz = rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM; uint32_t max_rx_pktlen; @@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, DPAA_IF_RX_CONTEXT_STASH; /*Create a channel and associate given queue with the channel*/ - qman_alloc_pool_range((u32 *)&rxq->ch_id, 1, 1, 0); + qman_alloc_pool_range(&ch_id, 1, 1, 0); + rxq->ch_id = (u16)ch_id; + opts.we_mask = opts.we_mask | QM_INITFQ_WE_DESTWQ; opts.fqd.dest.channel = rxq->ch_id; opts.fqd.dest.wq = DPAA_IF_RX_PRIORITY; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:08.999944261 +0800 +++ 0084-net-dpaa-fix-typecasting-channel-ID.patch 2024-11-11 14:23:05.222192838 +0800 @@ -1 +1 @@ -From 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e Mon Sep 17 00:00:00 2001 +From 9a1711950ed89b16332f4cc6e378de7269815ff6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 5edc61ee9a2c1e1d9c8b75faac4b61de7111c34e ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 51f5422e0c..afeca4307e 100644 +index bcb28f33ee..6fdbe80334 100644 @@ -23 +25 @@ -@@ -972,7 +972,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +@@ -971,7 +971,7 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, @@ -32 +34 @@ -@@ -1096,7 +1096,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, +@@ -1095,7 +1095,9 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,