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 3D72045843 for ; Fri, 23 Aug 2024 09:33:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3553842FE7; Fri, 23 Aug 2024 09:33:05 +0200 (CEST) Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012037.outbound.protection.outlook.com [52.101.66.37]) by mails.dpdk.org (Postfix) with ESMTP id 13E9642FCF; Fri, 23 Aug 2024 09:33:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=a/oP4esH4F8QxOZVfl8py4BFJHXYA7a98Whio86g1YF5+NZLOdvY9cgfQkJEy0VzArzlsbh2Va5hDfGQ0gSiy6yNawCe8OKFXTJ3Qr/9ETtfQNUHRLwSv0HAbnggJV+6R721ShKsiu/yE78YCapN7hGSdfIJQAZJtWdj5NrRl1F4VDt32V+ENFbY1rxPVdApzjUfALE8oei3an89UiEnDR6NlWiP7yWgbd4bS4q72hQ3olISrZ1MSxCy18faPMQX5ZkM/wc721HcdOeqShf5+ek1jk6hdj09k3/gXVRLDvWP9+2R/sBJPk2f7JhofsHbfXuqdD7cGe2oXHjZfUyM9g== 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=R6q42HsQFrqqj18IvhDZnpZvE2lWAJfJ8Ciiv01ZGGU=; b=U+g2XPkmvNkBQKxB+1ghlUND8pZ9sG6M6dxJZPpNEdxkiAPH01mH4AlHlyHPmbzWhiB19HqiaIGyLSvYgkI/8G4Sk1sewRuM62KrRlazsvEwbxXEkCDDLrL7qSycZm6jZRhGvYTpM5wDCpru/VcwE9fsVeOOIg+sZ6fbabtr1HOsej88g8xNCrwZUvPm+MVdbApLNWKnpKzhzdaktkHVBaHrlYBFbeBAzEKi4ifw8QkL7e7NLD16nGpVsNaeAAprDOWdG5DQbIW106W3yaT8xvbJuYEA3Jq0mi1r7cPFMGIV0k6zvtQSUCAVqZCxWcTHY1bpgZLxnlG3c7Cn8pgl2w== 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=R6q42HsQFrqqj18IvhDZnpZvE2lWAJfJ8Ciiv01ZGGU=; b=Jr5SNaoVwaVR4JE8SqpB5p9ClGiFNJxUUlaAGfjFeOLmZhpUP99wKGn0LTLzXYcWUNvPulTEdpPaOgBUDqTq6kJ9WmxEomYKt1h4DBLTKD4lZBPSOHLxqdkTx6Jp+5GAZGbJePluWFxIN6aH4E2OdpH62sNlDXX4a+0iqcmGXg91eoeXv5xBCdmqI8DMtuanN+pqgEaMBfZ+T/V2gCTYjn0TyC8E0W3/hET5HmNbKb5xMVxolWjDhGq6KpWfyj87+rY/U9UGDabUV+w/FKj5MHzes4302T2ROf5Ecz3j97qc4h2QKBwQ0JQB7RyesyYtsOHVjvO7kNwWlQnWcMt3Hw== 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 DBBPR04MB7547.eurprd04.prod.outlook.com (2603:10a6:10:208::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Fri, 23 Aug 2024 07:33:01 +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.7875.019; Fri, 23 Aug 2024 07:33:01 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Rohit Raj , hemant.agrawal@nxp.com, stable@dpdk.org Subject: [PATCH v2 02/18] net/dpaa: fix typecasting ch ID to u32 Date: Fri, 23 Aug 2024 13:02:24 +0530 Message-Id: <20240823073240.3708320-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240823073240.3708320-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240823073240.3708320-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DBBPR04MB7547:EE_ X-MS-Office365-Filtering-Correlation-Id: dadcede4-bac8-473a-a6f2-08dcc345d122 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?JbQ8SH9uqV6DoiI99aq55VU5CX/H9PnWX7snjucmaB9RjAKos054rAfzg8df?= =?us-ascii?Q?k4HvkL58l7wceBKniCDCR1z9ZyxwDuqpQxNK+I8w4PqioFTXVAZiYBhiSFT9?= =?us-ascii?Q?+7cJMyGDB0ZCGljNiQTQ99/vdpX1pE8QexlawPUs0XqTcj+7xpjh3R8kRiHM?= =?us-ascii?Q?uv5YSnJXCncZVjY2U9oki3gU+V8U5wLobZW0IHFhN6He3dzqRluyFiKn9H7D?= =?us-ascii?Q?nPVqHd0eUNeUDRYWWY3EikZxzV6Xr6fFsZmrNR/reStlgHCzh23QpTPuF5wC?= =?us-ascii?Q?sc5zxBc935rec90OwzKltiTIpSaM+NxTnZMN0UTdvUJBunRmnlm3svYcpqmR?= =?us-ascii?Q?vq/598fA9GF+0QkVgBJ33U++npAG+7U+fJ1lJjlxp8l5vCCPmncTj43c62Q+?= =?us-ascii?Q?rh7y5MYwNeCkrI2BOWBUfnxMTZDYAdyqNyff7XykhJeyJrmQavz95QWP3meA?= =?us-ascii?Q?nxl5sShjNv1TcY3U5war0ZIPN1FOM9sR4s3TADli0lniP311AzZsIhG3/Z2C?= =?us-ascii?Q?qreweX+TzvuFY/Yx/r6ahrlqH1Jdnn8jlBqHTnJLi+MDHKduvXnQ6zFoKCo9?= =?us-ascii?Q?zd1mPSDbDP/fT31zz/rQEQ8v1TDHD36NinZ/XlcU2eLbiFZIN8936R8laF1C?= =?us-ascii?Q?NolyMbYid6Pn3zi1gJshuHt8BQBBeB7zogRV11L3YSuejZwEB01rwh4zjlfy?= =?us-ascii?Q?sm6+ri52F7a7f4PrHBezmM4kPVQoFzigKK/8Gy4bOVr1Z0pJ08eBC5253uVz?= =?us-ascii?Q?QzXB2be67pvtlsrAnFo8LBisOlE3GljvWoXmimkzBN569Qoe1R8pJcLPJ6+w?= =?us-ascii?Q?+girmaFOe0mwI4cRr+zP9w7QQeMdhA/BSRzhuejdQhCJJFJGuiS64J4zt7Uv?= =?us-ascii?Q?UugOUsBSczFrr/ahQxg8JpAb/FxQcns5KYpotiKbjaoA4o8SdCF/aq3mFPnM?= =?us-ascii?Q?OVhT15mXQUwh7NAgL792zmWTaW8bxHDLvq+ua/p8e+UU5drW2BzYq/1tfo+z?= =?us-ascii?Q?nrK+v3D8gJvGgW3UD0CJW5S74xDfxFGGStSGuhLa+joLj9X32upekoMZFhSC?= =?us-ascii?Q?mnytE6Z+n42NwRpCCcNPLM5/Mm47YNwleGJ3pE16fZv3a3hYUD4fC2LJwEc5?= =?us-ascii?Q?+1B/XV+IWny6600Ep5c2WH42r+AIXld/OJg4hqRVY3uULRhst2qT9XBEn2g2?= =?us-ascii?Q?Kpg4KpzARFQ/MB4kTQsNbHLCg+5u8DZ0IPgjxP87WYs0lirMc+YnslnQ3iZK?= =?us-ascii?Q?44ZWKaAQjvQDyOMVCkrZwzNpq04cFgbXbftbVkklYIX7x+gv7FrXmwxdxsKb?= =?us-ascii?Q?vNP8XaH25ff5Yqc1fZuEQknN0KfuuJDMi9yaqV4uoxA85FiL5aMoiPa1qtuB?= =?us-ascii?Q?41sxPsGc4ksGcxKhabliDqnN8Q+Lp/2XrPJTrqlCgNW/A0XeLg=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)(366016)(376014)(1800799024)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?9Zlgs8Hc56fm3PVU0RjiMH9vqfuM7hfuogYbkkievcxjWoMpDBNIytvKWoka?= =?us-ascii?Q?TT4Lrtfs1pWYUIEqx+x3sxoggdfrkr9/5OQsLwmKjNZgpDgkOuHmSm8SqZWC?= =?us-ascii?Q?UdZ4WLccy+xIozdww1qaq621GX+5K3P7UE2E4MiX7Ttz2PvAbHKM2vRmZpEI?= =?us-ascii?Q?oMypppAbKH4L5UGBXFP2ZNfbiU6zjvUZ4IQHJE7DI1nZNcxNx+Bjh5GZfu3D?= =?us-ascii?Q?bi4D7OrBJsHdPSO7EJMdNViOV27BN2eiMOL7BDUFLvuR46qRQgqIMFMBV8rb?= =?us-ascii?Q?XiLohRVCHp3FegXA/tCZfZEHgGk4xQ+sPUyPmYKy+kFxFbD0z47NjslNlay1?= =?us-ascii?Q?bzmHU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S?= =?us-ascii?Q?YIvOnIFSKcr/1wUpAHEHncdyllDNikVY6emw6/ys/PqG7BUjD0NVTEDcfRI3?= =?us-ascii?Q?29KFnJHgGAQKKjaza/g230Aj2XKi5EPN7aiE/xlCt5rXME8Mb9/2EnzUnwc9?= =?us-ascii?Q?BjyA8/tHss0pNRsAfwcP+kZPXrXCj9Ho1kNdzbVxoksR82tmWwdDb1/jhtSR?= =?us-ascii?Q?1MaEgofjEI3YvH4cLt7KAZNR/RXQ+gXcG1oD/UqXVkN+m1LQXgMvv5Pkcze5?= =?us-ascii?Q?r8XM/gq4YGK0WROXF0VysH4I3DS+5H17vxqLmpwlx515tn728WygtZxk51rW?= =?us-ascii?Q?j6Vk/MtsYbzA34RMkyJd64StefRkr18PquYp01wOMggd390S/kvTUPlhg2TF?= =?us-ascii?Q?/g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dadcede4-bac8-473a-a6f2-08dcc345d122 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 07:33:01.0113 (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: LlRNnm9TsLPuV2P3gq/JD4ctrvjtqKdR3JNeZokz9fEpSWP2wa/mJZbHNdYc0MwDfhSaSW4IFFisgwFxNUDY2g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7547 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. 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