[v2,2/2] net/enetc: fix big endian build

Message ID 20190409200636.2193-3-thomas@monjalon.net
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • fix big endian build
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon April 9, 2019, 8:06 p.m.
Compilation was failing when using a big endian toolchain:

drivers/net/enetc/enetc_rxtx.c:92:21: error:
	passing argument 1 of 'rte_constant_bswap64'
	makes integer from pointer without a cast

Fixes: 469c6111a799 ("net/enetc: enable Rx and Tx")
Cc: g.singh@nxp.com
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/enetc/enetc_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/drivers/net/enetc/enetc_rxtx.c b/drivers/net/enetc/enetc_rxtx.c
index 631e2430d..ef0d7919f 100644
--- a/drivers/net/enetc/enetc_rxtx.c
+++ b/drivers/net/enetc/enetc_rxtx.c
@@ -88,8 +88,9 @@  enetc_refill_rx_ring(struct enetc_bdr *rx_ring, const int buff_cnt)
 	rx_swbd = &rx_ring->q_swbd[i];
 	rxbd = ENETC_RXBD(*rx_ring, i);
 	for (j = 0; j < buff_cnt; j++) {
-		rx_swbd->buffer_addr =
-			rte_cpu_to_le_64(rte_mbuf_raw_alloc(rx_ring->mb_pool));
+		rx_swbd->buffer_addr = (void *)(uintptr_t)
+			rte_cpu_to_le_64((uint64_t)(uintptr_t)
+					rte_mbuf_raw_alloc(rx_ring->mb_pool));
 		rxbd->w.addr = (uint64_t)(uintptr_t)
 			       rx_swbd->buffer_addr->buf_addr +
 			       rx_swbd->buffer_addr->data_off;