From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id BD9A68E71 for ; Fri, 11 Dec 2015 08:10:52 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 10 Dec 2015 23:10:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,412,1444719600"; d="scan'208";a="11395063" Received: from dpdk15.sh.intel.com ([10.239.129.25]) by fmsmga004.fm.intel.com with ESMTP; 10 Dec 2015 23:10:50 -0800 From: Huawei Xie To: dev@dpdk.org Date: Thu, 10 Dec 2015 23:15:58 +0800 Message-Id: <1449760558-63146-1-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.8.1.4 X-Mailman-Approved-At: Fri, 11 Dec 2015 15:22:01 +0100 Subject: [dpdk-dev] [PATCH] xenvirt: fix compilation issues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 07:10:53 -0000 Reported-by: Christian Ehrhardt Signed-off-by: Huawei Xie --- drivers/net/xenvirt/rte_mempool_gntalloc.c | 6 +++--- drivers/net/xenvirt/rte_xen_lib.c | 4 ++-- drivers/net/xenvirt/virtqueue.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/xenvirt/rte_mempool_gntalloc.c b/drivers/net/xenvirt/rte_mempool_gntalloc.c index 3a650e8..0585f08 100644 --- a/drivers/net/xenvirt/rte_mempool_gntalloc.c +++ b/drivers/net/xenvirt/rte_mempool_gntalloc.c @@ -184,10 +184,10 @@ _create_mempool(const char *name, unsigned elt_num, unsigned elt_size, rv = ioctl(gntalloc_fd, IOCTL_GNTALLOC_DEALLOC_GREF, &arg); if (rv) { /* shouldn't fail here */ - RTE_LOG(ERR, PMD, "va=%p pa=%p index=%p %s\n", + RTE_LOG(ERR, PMD, "va=%p pa=%"PRIu64"x index=%"PRIu64" %s\n", gnt_arr[i].va, - (void *)gnt_arr[i].pa, - (void *)arg.index, strerror(errno)); + gnt_arr[i].pa, + arg.index, strerror(errno)); rte_panic("gntdealloc failed when freeing pages\n"); } } diff --git a/drivers/net/xenvirt/rte_xen_lib.c b/drivers/net/xenvirt/rte_xen_lib.c index 3e97c1a..de63cd3 100644 --- a/drivers/net/xenvirt/rte_xen_lib.c +++ b/drivers/net/xenvirt/rte_xen_lib.c @@ -115,8 +115,8 @@ get_phys_map(void *va, phys_addr_t pa[], uint32_t pg_num, uint32_t pg_sz) (rc = pread(fd, pa, nb, ofs)) < 0 || (rc -= nb) != 0) { RTE_LOG(ERR, PMD, "%s: failed read of %u bytes from \'%s\' " - "at offset %zu, error code: %d\n", - __func__, nb, PAGEMAP_FNAME, ofs, errno); + "at offset %lu, error code: %d\n", + __func__, nb, PAGEMAP_FNAME, (unsigned long)ofs, errno); rc = ENOENT; } diff --git a/drivers/net/xenvirt/virtqueue.h b/drivers/net/xenvirt/virtqueue.h index 6dcb0ef..5312347 100644 --- a/drivers/net/xenvirt/virtqueue.h +++ b/drivers/net/xenvirt/virtqueue.h @@ -55,7 +55,7 @@ struct rte_mbuf; * rather than gpa<->hva in virito spec. */ #define RTE_MBUF_DATA_DMA_ADDR(mb) \ - rte_pktmbuf_mtod(mb, uint64_t) + ((uint64_t)(uintptr_t)rte_pktmbuf_mtod(mb, void *)) enum { VTNET_RQ = 0, VTNET_TQ = 1, VTNET_CQ = 2 }; @@ -198,7 +198,7 @@ virtqueue_enqueue_recv_refill(struct virtqueue *rxvq, struct rte_mbuf *cookie) dxp->ndescs = needed; start_dp[head_idx].addr = - (uint64_t) ((uint64_t)cookie->buf_addr + RTE_PKTMBUF_HEADROOM - sizeof(struct virtio_net_hdr)); + (uint64_t) ((uintptr_t)cookie->buf_addr + RTE_PKTMBUF_HEADROOM - sizeof(struct virtio_net_hdr)); start_dp[head_idx].len = cookie->buf_len - RTE_PKTMBUF_HEADROOM + sizeof(struct virtio_net_hdr); start_dp[head_idx].flags = VRING_DESC_F_WRITE; rxvq->vq_desc_head_idx = start_dp[head_idx].next; -- 1.8.1.4