From: Pablo de Lara Date: Sun, 10 Apr 2016 19:25:51 +0000 (+0100) Subject: xenvirt: fix 32-bit build X-Git-Tag: spdx-start~7015 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=57d78d33bedce710a7fb64c44b47d1cd0eed6fdc;p=dpdk.git xenvirt: fix 32-bit build Compilation fails on 32 bits on Xen driver, due to wrong casting: drivers/net/xenvirt/virtqueue.h: In function ‘virtqueue_enqueue_xmit’: drivers/net/xenvirt/virtqueue.h:234:24: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] start_dp[idx].addr = rte_pktmbuf_mtod(cookie, uint64_t); ^ Fixes: d6b324c00fc9 ("mbuf: get DMA address") Signed-off-by: Pablo de Lara --- diff --git a/drivers/net/xenvirt/virtqueue.h b/drivers/net/xenvirt/virtqueue.h index e425a04e5e..350eae3ec7 100644 --- a/drivers/net/xenvirt/virtqueue.h +++ b/drivers/net/xenvirt/virtqueue.h @@ -231,7 +231,7 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq, struct rte_mbuf *cookie) start_dp[idx].flags = VRING_DESC_F_NEXT; start_dp[idx].addr = (uintptr_t)NULL; idx = start_dp[idx].next; - start_dp[idx].addr = rte_pktmbuf_mtod(cookie, uint64_t); + start_dp[idx].addr = (uint64_t)rte_pktmbuf_mtod(cookie, uintptr_t); start_dp[idx].len = cookie->data_len; start_dp[idx].flags = 0; idx = start_dp[idx].next;