[PATCH 17/17] net/pfe: fix for 32 bit and PPC compilation

nipun.gupta at nxp.com nipun.gupta at nxp.com
Fri Dec 3 13:22:12 CET 2021


From: Sachin Saxena <sachin.saxena at nxp.com>

This patch fixes compilation for 32 bit and power PC
compiler.

Fixes: 36220514de01 ("net/pfe: add Rx/Tx")
Cc: stable at dpdk.org

Signed-off-by: Hemant Agrawal <hemant.agrawal at nxp.com>
Signed-off-by: Sachin Saxena <sachin.saxena at nxp.com>
---
 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



More information about the stable mailing list