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 ACEA645711 for ; Thu, 1 Aug 2024 12:53:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 571494337C; Thu, 1 Aug 2024 12:53:36 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011019.outbound.protection.outlook.com [52.101.65.19]) by mails.dpdk.org (Postfix) with ESMTP id B4BAA432B0; Thu, 1 Aug 2024 12:53:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c1K6XUj62b+4wpn8IXeyGkp4Aa8QWoClYwPrYdblas2BLnV3bH3kjNVSpvYZwTCL9YkNmvluyfrmJ7a6iTixK+BcpRBCx48JmLxmkdSKRQ/AbIn7wJsaneAeeybFQZIYEqnZOAiyCDNvsV/xkqYky7IxQU+PyA1HsFeWX2J8PcRBIcs2urCVnIHxyTA3k3VCaoiR7aNcZxIb41xwReMcGF6NhNWk70aW5aeP1uRNywoTCIxdeqkO4nNR4Hrn9SDVKxO4kg27G25RDYzeGEvc9x0DY7/XPSpsQG/AOkyvu7yZA8ZFG2zzKqcOR5JTS54nA5POI0J8I8wmBNh3h9px6g== 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=3Lb8EfqZZPQm/j9MCtAb8D8Yrh/1MKk2R2FaQFsqf08=; b=soeECz0KBoxfBlob0IUbCd9CakEGFR0fukyxuupPQgT0qGmCf6bFU+SFeNKVbF2wZ+Os2Ev2CvcfjlTNpT5ltjDefqSupeOjDCrD6lbpE1sPFEtAuq/kiR9tYMdscwi6TUP3fvYXmvvMnscp0bqceIdSs5vyP63F5Ad5HrSweKPxQZuf7E65wYrGJhaRgz9CiIb7jmNx/jU8N9iuhp349HSxiTc7mqLVw4heV7RCaS0P/3w9hzWY868Y75XjEN4qOpt6DkuAHvHfdyFdkvWW1Gwfk8OEp2edSnbFaIkTHxu8yIk34FaEXsuZG4Z/38Tn0O49+MZ8irwYiQ4CzC2RYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3Lb8EfqZZPQm/j9MCtAb8D8Yrh/1MKk2R2FaQFsqf08=; b=a3KFbpqrCRoWG03xyCRfQ7O/Mil3SKb6ve5kc+apMih7pjm089krGL/7EjvJLytVJSYurRetI5e11Jop+N/PZLKOK1T24qwqgUyOMf+xcqqE/acHINBKQ3vwqYOXvQeKc29Yg/VJ2NJQBBUHqzLlz9bmfESNOy7kl56y3sb3w6YZhoo0vO2tMswLYVedHb5ibCv42iRLJQTWrevu3gksN3LiD5JM9rlev7wcKOGb1ZSbiPRbZO6CfMJynuoMThi8W64butctB3fREh4RgoBF1WorxXB7ne8GQG3oufyR3Mxi1c6htIowaFgHa/08iho+aussQNCGuulE5He79HVzUw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by AS8PR04MB8433.eurprd04.prod.outlook.com (2603:10a6:20b:407::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.23; Thu, 1 Aug 2024 10:53:31 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7828.021; Thu, 1 Aug 2024 10:53:31 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Rohit Raj , hemant.agrawal@nxp.com, stable@dpdk.org Subject: [PATCH 02/17] net/dpaa: fix typecasting ch ID to u32 Date: Thu, 1 Aug 2024 16:22:58 +0530 Message-Id: <20240801105313.630280-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240801105313.630280-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0026.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::13) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AS8PR04MB8433:EE_ X-MS-Office365-Filtering-Correlation-Id: ac2a31b1-c511-4844-fedb-08dcb2182e77 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?xGfZ56J5hyx18dOr33GiB/E/Me9LkyFuWvVrAo+rLtM8SUnWfN7h9hP5UyUk?= =?us-ascii?Q?ZEWcYH7uPTQnbKmzG6H5n25yJwprNcfCScQtBGrFahw/xE4Sd3Kg2hvI112I?= =?us-ascii?Q?rkb24RoizXoTumBQ0EoGZKRx3H31YcqtpK0zpiCwPp57NOqdDhER4QIi3e0f?= =?us-ascii?Q?LDzpqdcHqgudwHxxIzwdMNcsbKcf3kvyRmibN4MhhA3jNG2cb2iJDotNXdpq?= =?us-ascii?Q?HlAbV6yopcIZ7kbu+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jp?= =?us-ascii?Q?4laVT2nwKP3wiLITUAB5W8cwVmDwQc52wLJi5fpqSFpm1EBmeHKF01srmSq+?= =?us-ascii?Q?naxFco4Kg7lmiavlMLdZu3/W5Hx0FgR4UHDOgmkCgqKKuwXPhphJ4dzfdXei?= =?us-ascii?Q?kaKikJGsSHK9cIJNwHFvBS44Sjyvek8DNVEhTd5of3p4yGrNl6DAE/39roOZ?= =?us-ascii?Q?OqjNc4sB7bmREbFwHyKYYzVBdQysAAZkPq8G72rRQbsfmgNNAp1KuaTfPOpb?= =?us-ascii?Q?NQGpCfNHCf78mgjGtRLbUmDCFJO+Na7kMdLaxUBXOzTFO1RIug=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?F+sj2+O56YK6MF4J0Bf8nrES+m6+1qGoCs76q5YZfXhLBypwN0IT7fVyzhWY?= =?us-ascii?Q?xxa/cnqCIjkh9CKOxQicn/bMD+HqCkP4E7OPN0BXkhll5eM2iXGoiLAb52Ud?= =?us-ascii?Q?0VZLED7zGu4hyNaefjzC1/1fHCupILG/A4r9EIwkLFTdzXUJusRyJUOdhGLe?= =?us-ascii?Q?42cqPngjSdunmye313eDrDAMSKO9G/la8zIGNEhpxDFBHPk9C4xLLYzphqJC?= =?us-ascii?Q?8CkQfVdP7QQgUTz18fYyrAXUj5IwGpsXS0JOJm6K6fgKJGW9fC88Q/+SL4eh?= =?us-ascii?Q?zphLT6H9mxMv/qw/Q27JeDTFWsPUUqJLFlukIGU298UTv0m9H7wO76CIbhkV?= =?us-ascii?Q?KJXh8sFDOHjlfqAVuPisRWOA58a77N5olTQA7CCHC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cBHdetuWXxCU83+FELImlWVXSnTaCUCBICPklhy6+Cu1fwY//?= =?us-ascii?Q?v3Fj2SHXQTg3s8g/WkmyaqwDjV7Pf3DJHGHzdzqYaJjuDemeExQ1g5W9wNEH?= =?us-ascii?Q?3YBD3OcT3CGYEkSw15Ov4xqk7wwyPSsHOBQYpt29d9NBEWn9CZFrvz5D+0/1?= =?us-ascii?Q?nyEKWWBBi0l++W7ArQdAQ88b3VJpTSx0+o7C2mstlzWft7LefeUqfJRlAB7y?= =?us-ascii?Q?IhVefX73TsIVULIjB+CsfHVLgHzvJDkoei512AWdOb3t8wDZBcIVB8e8EO4b?= =?us-ascii?Q?NT0U874SR0eJ3Qi46FglELXyKBEXEtJeHzStdBi5tFwwraAiMe7zD5T5UDXH?= =?us-ascii?Q?0g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac2a31b1-c511-4844-fedb-08dcb2182e77 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 10:53:30.9888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dCoEgHbwena2b25rxSHrFtpP9d9ehYQSHTxJwLXU7yJss6jrHDHPTlYpp8ZJGWIAALRLwsPFLNcOHvhdiK1pRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8433 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 From: Rohit Raj Avoid typecasting ch_id to u32 and passing it to another API since it can corrupt other data. Instead, create new u32 variable and typecase it back to u16 after it gets updated by the API. NXP CID: 27996293 Fixes: 0c504f6950b6 ("net/dpaa: support push mode") Cc: hemant.agrawal@nxp.com Cc: stable@dpdk.org Signed-off-by: Rohit Raj --- 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 060b8c678f..1a2de5240f 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -972,7 +972,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; @@ -1096,7 +1096,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.25.1