summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coquelin <maxime.coquelin@redhat.com>2018-04-23 18:48:18 +0200
committerLuca Boccassi <bluca@debian.org>2018-04-23 17:51:33 +0100
commit9d2277adcfb5b60d51f6dd2697c14992963c9b93 (patch)
tree01c18460817ea4b3200fc1045380a8bcdbd5da05
parentd59f6530acb80aa7c41aea9d1074e2b3dbe09ef8 (diff)
downloaddpdk-stable-17.08.zip
dpdk-stable-17.08.tar.gz
dpdk-stable-17.08.tar.xz
vhost: fix compilation issue when vhost debug enabled17.08
This patch fixes below compilation issue when RTE_LIBRTE_VHOST_DEBUG is enabled: In file included from ./lib/librte_vhost/virtio_net.c:50:0: ./lib/librte_vhost/virtio_net.c: In function ‘copy_mbuf_to_desc’: ./lib/librte_vhost/vhost.h:205:42: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=] snprintf(packet, VHOST_MAX_PRINT_BUFF, "(%d) Header size %d: ", (device->vid), (size)); \ ^ ./lib/librte_vhost/virtio_net.c:301:4: note: in expansion of macro ‘PRINT_PACKET’ PRINT_PACKET(dev, (uintptr_t)dst, len, 0); ^~~~~~~~~~~~ Fixes: 4cffc971276e ("vhost: add support for non-contiguous indirect descs tables") Fixes: 23c7270c36f3 ("vhost: handle virtually non-contiguous buffers in Rx") Fixes: c47e72beb209 ("vhost: handle virtually non-contiguous buffers in Rx-mrg") Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com> Acked-by: Luca Boccassi <bluca@debian.org>
-rw-r--r--lib/librte_vhost/virtio_net.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 42ca851..a6c1332 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -257,7 +257,7 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vring_desc *descs,
rte_memcpy((void *)(uintptr_t)dst,
(void *)(uintptr_t)src, len);
- PRINT_PACKET(dev, (uintptr_t)dst, len, 0);
+ PRINT_PACKET(dev, (uintptr_t)dst, (uint32_t)len, 0);
vhost_log_write(dev, guest_addr, len);
remain -= len;
guest_addr += len;
@@ -688,7 +688,7 @@ copy_mbuf_to_desc_mergeable(struct virtio_net *dev, struct rte_mbuf *m,
len);
PRINT_PACKET(dev, (uintptr_t)dst,
- len, 0);
+ (uint32_t)len, 0);
vhost_log_write(dev, guest_addr, len);
remain -= len;
@@ -1071,7 +1071,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs,
rte_prefetch0((void *)(uintptr_t)(desc_addr + desc_offset));
PRINT_PACKET(dev, (uintptr_t)(desc_addr + desc_offset),
- desc_chunck_len, 0);
+ (uint32_t)desc_chunck_len, 0);
mbuf_offset = 0;
mbuf_avail = m->buf_len - RTE_PKTMBUF_HEADROOM;
@@ -1136,7 +1136,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs,
desc_avail = desc->len;
PRINT_PACKET(dev, (uintptr_t)desc_addr,
- desc_chunck_len, 0);
+ (uint32_t)desc_chunck_len, 0);
} else if (unlikely(desc_chunck_len == 0)) {
desc_chunck_len = desc_avail;
desc_gaddr += desc_offset;
@@ -1148,7 +1148,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs,
desc_offset = 0;
PRINT_PACKET(dev, (uintptr_t)desc_addr,
- desc_chunck_len, 0);
+ (uint32_t)desc_chunck_len, 0);
}
/*