From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: stable@dpdk.org, bluca@debian.org
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [dpdk-stable] [PATCH v16.11 LTS] vhost: fix compilation issue when vhost debug enabled
Date: Mon, 23 Apr 2018 18:31:33 +0200 [thread overview]
Message-ID: <20180423163133.2659-1-maxime.coquelin@redhat.com> (raw)
This patch fixes below compilation issue when
RTE_LIBRTE_VHOST_DEBUG is enabled:
In file included from /home/max/projects/src/mainline/dpdk/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)); \
^
/home/max/projects/src/mainline/dpdk/lib/librte_vhost/virtio_net.c:301:4: note: in expansion of macro ‘PRINT_PACKET’
PRINT_PACKET(dev, (uintptr_t)dst, len, 0);
^~~~~~~~~~~~
Fixes: 067047a90055 ("vhost: handle virtually non-contiguous buffers in Tx")
Fixes: dd906b814d9a ("vhost: handle virtually non-contiguous buffers in Rx")
Fixes: 2b8d39414619 ("vhost: handle virtually non-contiguous buffers in Rx-mrg")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
lib/librte_vhost/virtio_net.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 745cc53f4..871a58f72 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -298,7 +298,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);
remain -= len;
guest_addr += len;
dst += len;
@@ -736,7 +736,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);
remain -= len;
guest_addr += len;
@@ -1116,7 +1116,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;
@@ -1181,7 +1181,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;
@@ -1194,7 +1194,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);
}
/*
--
2.14.3
next reply other threads:[~2018-04-23 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 16:31 Maxime Coquelin [this message]
2018-04-23 16:49 ` Luca Boccassi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180423163133.2659-1-maxime.coquelin@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=bluca@debian.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).