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 55A32A0C45 for ; Fri, 3 Dec 2021 13:22:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4C9D040041; Fri, 3 Dec 2021 13:22:21 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id C2F8A4067B for ; Fri, 3 Dec 2021 13:22:19 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id A259D1A0618; Fri, 3 Dec 2021 13:22:19 +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 6B5F51A011E; Fri, 3 Dec 2021 13:22:19 +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 E5930183AD05; Fri, 3 Dec 2021 20:22:18 +0800 (+08) From: nipun.gupta@nxp.com To: hemant.agrawal@nxp.com Cc: stable@dpdk.org, Sachin Saxena Subject: [PATCH 17/17] net/pfe: fix for 32 bit and PPC compilation Date: Fri, 3 Dec 2021 17:52:12 +0530 Message-Id: <20211203122212.11347-18-nipun.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211203122212.11347-1-nipun.gupta@nxp.com> References: <20211203122212.11347-1-nipun.gupta@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP 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: 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