A previous patch changed the debug() calls in vu_control_handler() to trace() to reduce noise when debugging migration. However those messages are infrequent, and pretty useful when debugging migration (I used them to discover I needed a different qemu version). At the same time we have potentially per-packet debug() messages in vu_kick_cb() and vu_send_single(). These get much more in the way since they occur asynchronously with the migration operation. As a rule, per packet messages should be trace() level anyway. [This is a candidate to fold into the earlier patch] Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- vhost_user.c | 8 ++++---- vu_common.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vhost_user.c b/vhost_user.c index 19ede8a9..755017f1 100644 --- a/vhost_user.c +++ b/vhost_user.c @@ -1181,11 +1181,11 @@ void vu_control_handler(struct vu_dev *vdev, int fd, uint32_t events) vu_sock_reset(vdev); return; } - trace("================ Vhost user message ================"); - trace("Request: %s (%d)", vu_request_to_string(msg.hdr.request), + debug("================ Vhost user message ================"); + debug("Request: %s (%d)", vu_request_to_string(msg.hdr.request), msg.hdr.request); - trace("Flags: 0x%x", msg.hdr.flags); - trace("Size: %u", msg.hdr.size); + debug("Flags: 0x%x", msg.hdr.flags); + debug("Size: %u", msg.hdr.size); need_reply = msg.hdr.flags & VHOST_USER_NEED_REPLY_MASK; diff --git a/vu_common.c b/vu_common.c index 78d1c1ba..48826b13 100644 --- a/vu_common.c +++ b/vu_common.c @@ -240,7 +240,7 @@ void vu_kick_cb(struct vu_dev *vdev, union epoll_ref ref, if (rc == -1) die_perror("vhost-user kick eventfd_read()"); - debug("vhost-user: got kick_data: %016"PRIx64" idx: %d", + trace("vhost-user: got kick_data: %016"PRIx64" idx: %d", kick_data, ref.queue); if (VHOST_USER_IS_QUEUE_TX(ref.queue)) vu_handle_tx(vdev, ref.queue, now); @@ -264,7 +264,7 @@ int vu_send_single(const struct ctx *c, const void *buf, size_t size) int elem_cnt; int i; - debug("vu_send_single size %zu", size); + trace("vu_send_single size %zu", size); if (!vu_queue_enabled(vq) || !vu_queue_started(vq)) { debug("Got packet, but RX virtqueue not usable yet"); @@ -296,7 +296,7 @@ int vu_send_single(const struct ctx *c, const void *buf, size_t size) vu_flush(vdev, vq, elem, elem_cnt); - debug("vhost-user sent %zu", total); + trace("vhost-user sent %zu", total); return total; err: -- 2.48.1