From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 24E4B8E6C for ; Sat, 12 Dec 2015 08:15:07 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 11 Dec 2015 23:15:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,417,1444719600"; d="scan'208";a="11927524" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 11 Dec 2015 23:15:06 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 11 Dec 2015 23:15:06 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.28]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.105]) with mapi id 14.03.0248.002; Sat, 12 Dec 2015 15:15:06 +0800 From: "Tan, Jianfeng" To: "Huawei@dpdk.org" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] xenvirt: fix compilation issues Thread-Index: AQHRNB9jJjdvCis/LEKCwmbbvaEOxZ7G8Hgg Date: Sat, 12 Dec 2015 07:15:05 +0000 Message-ID: References: <1449760558-63146-1-git-send-email-huawei.xie@intel.com> In-Reply-To: <1449760558-63146-1-git-send-email-huawei.xie@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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: Sat, 12 Dec 2015 07:15:08 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei@dpdk.org > Sent: Thursday, December 10, 2015 11:16 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] xenvirt: fix compilation issues >=20 > 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(-) >=20 > 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 =3D ioctl(gntalloc_fd, > IOCTL_GNTALLOC_DEALLOC_GREF, &arg); > if (rv) { > /* shouldn't fail here */ > - RTE_LOG(ERR, PMD, "va=3D%p pa=3D%p > index=3D%p %s\n", > + RTE_LOG(ERR, PMD, "va=3D%p > pa=3D%"PRIu64"x index=3D%"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 =3D pread(fd, pa, nb, ofs)) < 0 || > (rc -=3D nb) !=3D 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 =3D ENOENT; > } >=20 > 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 *)) >=20 > enum { VTNET_RQ =3D 0, VTNET_TQ =3D 1, VTNET_CQ =3D 2 }; >=20 > @@ -198,7 +198,7 @@ virtqueue_enqueue_recv_refill(struct virtqueue > *rxvq, struct rte_mbuf *cookie) > dxp->ndescs =3D needed; >=20 > start_dp[head_idx].addr =3D > - (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 =3D cookie->buf_len - > RTE_PKTMBUF_HEADROOM + sizeof(struct virtio_net_hdr); > start_dp[head_idx].flags =3D VRING_DESC_F_WRITE; > rxvq->vq_desc_head_idx =3D start_dp[head_idx].next; > -- > 1.8.1.4 Looks good to me. Just one thing, shall we keep unified on printing out eit= her errno, or strerror(errno)? Acked-by: Jianfeng Tan Thanks, Jianfeng