Message ID | 20240823073240.3708320-3-hemant.agrawal@nxp.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Ferruh Yigit |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C27145843; Fri, 23 Aug 2024 09:33:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA00D42FF9; Fri, 23 Aug 2024 09:33:03 +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 <hemant.agrawal@nxp.com> To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Rohit Raj <rohit.raj@nxp.com>, 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: JbQ8SH9uqV6DoiI99aq55VU5CX/H9PnWX7snjucmaB9RjAKos054rAfzg8dfk4HvkL58l7wceBKniCDCR1z9ZyxwDuqpQxNK+I8w4PqioFTXVAZiYBhiSFT9+7cJMyGDB0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0IPgjxP87WYs0lirMc+YnslnQ3iZK44ZWKaAQjvQDyOMVCkrZwzNpq04cFgbXbftbVkklYIX7x+gv7FrXmwxdxsKbvNP8XaH25ff5Yqc1fZuEQknN0KfuuJDMi9yaqV4uoxA85FiL5aMoiPa1qtuB41sxPsGc4ksGcxKhabliDqnN8Q+Lp/2XrPJTrqlCgNW/A0XeLg== 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: 9Zlgs8Hc56fm3PVU0RjiMH9vqfuM7hfuogYbkkievcxjWoMpDBNIytvKWokaTT4Lrtfs1pWYUIEqx+x3sxoggdfrkr9/5OQsLwmKjNZgpDgkOuHmSm8SqZWCUdZ4WLccy+xIozdww1qaq621GX+5K3P7UE2E4MiX7Ttz2PvAbHKM2vRmZpEIoMypppAbKH4L5UGBXFP2ZNfbiU6zjvUZ4IQHJE7DI1nZNcxNx+Bjh5GZfu3Dbi4D7OrBJsHdPSO7EJMdNViOV27BN2eiMOL7BDUFLvuR46qRQgqIMFMBV8rbXiLohRVCHp3FegXA/tCZfZEHgGk4xQ+sPUyPmYKy+kFxFbD0z47NjslNlay1bzmHUhHgynfNqHeAmPIeMXUKzvhAPguq/xTwFAJRF+ONRF7OuTHKGObIYUSmHmezt27nzqumdoESTGjlHlT50KD0NiglGmGE4ZA46iidvLop6roBBqxdfuNgHpDsWVD0dCHlXItK0u09W6QvHPrwscli8YlvlV6zZyg+AwFJd2xkkxy5R4AXPztmlwaqAioyNFlAVIPBR5Ly8Fs4Hyuh0Eq4S9TRqwVvAm0m0U/en+XNwBWnbfYwYUB5EX1V11vV79j/vCIVv7gCnqB8fI/9zFMA4fwG33hOeV2OooadhlAhGueaK02DFY4mmGxANE1ggYA0GN4ff/UzNwoZOx7TxuMEVZdzIkHBsO1yst5WPbCiUEupW5hlfFmAENLEaqxCXPd+JPAJQeBvw/UY+DZidmbKEp/RR1wNyoxKyRD6c3SEnIat/knrISohokaRh5mKA4FnOwoeoLFWwa8XeHDW/RqarbIv/944tk+yYlkVkzm59NabZTrSyFJ377xhdP1NhTl8BpDj7aUWLsiqFoMetKIpR0rAoVd+2cswPQ3TdrtTVDEaWRRf7uguaUhGW4wEJCeZRqZYeOgDzo1NOpGU5SktjPGGgBvr7O3X0ZL3UtaJN3eV/pb8hv54wxnX3bSYTaoXA/u4EO0TG10kQIpW3GEK14KXBpBffUGrnt7Y6CMhV9TbNCTRneRinHGkOqXXEUOy3xcsnTicMAQwWCofOQ98rbpXRTZLDye8hC2ISrC+mWLHuOe+vfrmbYC8Du+2OpOokPWTcNdII3ZgbaLD0wm8oVn3uNQKks7wFyFoEu47zTtDbGuKkOROyk8ysdR4jx0fXDFJXxU3mR63N4Kbc+F7hhbXVdX1+URCIBsq/mP24n2Gt0ETYq8n4jUarusqINgSYIvOnIFSKcr/1wUpAHEHncdyllDNikVY6emw6/ys/PqG7BUjD0NVTEDcfRI329KFnJHgGAQKKjaza/g230Aj2XKi5EPN7aiE/xlCt5rXME8Mb9/2EnzUnwc9BjyA8/tHss0pNRsAfwcP+kZPXrXCj9Ho1kNdzbVxoksR82tmWwdDb1/jhtSR1MaEgofjEI3YvH4cLt7KAZNR/RXQ+gXcG1oD/UqXVkN+m1LQXgMvv5Pkcze5r8XM/gq4YGK0WROXF0VysH4I3DS+5H17vxqLmpwlx515tn728WygtZxk51rWj6Vk/MtsYbzA34RMkyJd64StefRkr18PquYp01wOMggd390S/kvTUPlhg2TF/g== 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: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
NXP DPAA ETH driver enhancement and fixes
|
|
Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
Commit Message
Hemant Agrawal
Aug. 23, 2024, 7:32 a.m. UTC
From: Rohit Raj <rohit.raj@nxp.com> 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 <rohit.raj@nxp.com> --- 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;