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 9032CA034F; Mon, 6 Dec 2021 13:20:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 410204277E; Mon, 6 Dec 2021 13:18:49 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 44ACB411C3; Mon, 6 Dec 2021 13:18:34 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2827F1A134E; Mon, 6 Dec 2021 13:18:34 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E575A1A06EF; Mon, 6 Dec 2021 13:18:33 +0100 (CET) Received: from lsv03274.swis.in-blr01.nxp.com (lsv03274.swis.in-blr01.nxp.com [92.120.147.114]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 4E169183AD05; Mon, 6 Dec 2021 20:18:33 +0800 (+08) From: nipun.gupta@nxp.com To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com, stable@dpdk.org, Sachin Saxena Subject: [PATCH 17/17] net/pfe: fix for 32 bit and PPC compilation Date: Mon, 6 Dec 2021 17:48:24 +0530 Message-Id: <20211206121824.3493-18-nipun.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211206121824.3493-1-nipun.gupta@nxp.com> References: <20211206121824.3493-1-nipun.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Sachin Saxena This patch fixes compilation for 32 bit and power PC compiler. Fixes: 36220514de01 ("net/pfe: add Rx/Tx") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Signed-off-by: Sachin Saxena --- drivers/net/pfe/pfe_hif.c | 3 ++- drivers/net/pfe/pfe_hif_lib.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/pfe/pfe_hif.c b/drivers/net/pfe/pfe_hif.c index eade726b2e..67efb8b3a7 100644 --- a/drivers/net/pfe/pfe_hif.c +++ b/drivers/net/pfe/pfe_hif.c @@ -309,7 +309,8 @@ client_put_rxpacket(struct hif_rx_queue *queue, if (readl(&desc->ctrl) & CL_DESC_OWN) { - mbuf = rte_cpu_to_le_64(rte_pktmbuf_alloc(pool)); + mbuf = (struct rte_mbuf *) + rte_cpu_to_le_64((uintptr_t)rte_pktmbuf_alloc(pool)); if (unlikely(!mbuf)) { PFE_PMD_WARN("Buffer allocation failure\n"); return NULL; diff --git a/drivers/net/pfe/pfe_hif_lib.c b/drivers/net/pfe/pfe_hif_lib.c index 799050dce3..2487273a7c 100644 --- a/drivers/net/pfe/pfe_hif_lib.c +++ b/drivers/net/pfe/pfe_hif_lib.c @@ -50,7 +50,8 @@ pfe_hif_shm_init(struct hif_shm *hif_shm, struct rte_mempool *mb_pool) hif_shm->rx_buf_pool_cnt = HIF_RX_DESC_NT; for (i = 0; i < hif_shm->rx_buf_pool_cnt; i++) { - mbuf = rte_cpu_to_le_64(rte_pktmbuf_alloc(mb_pool)); + mbuf = (struct rte_mbuf *) + rte_cpu_to_le_64((uintptr_t)rte_pktmbuf_alloc(mb_pool)); if (mbuf) hif_shm->rx_buf_pool[i] = mbuf; else -- 2.17.1