From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=AI1drc5L; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id C98F85A004E for ; Mon, 03 Feb 2025 10:26:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1738574768; bh=3qRwjEAtPSeY0Tw16SWDxXXsGnDXWfO7l/vayeGsXsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AI1drc5LQNo415cdRQzgwZ+UB52N3ulPS/gigO7wmKI07/t9iyWrU1lMGfQUbw9MY Snvx/eBpuLiXzrc9Nswy6uXka2wlqGc6Qikq9ixdBruK58lekLEVzPC0HSIXG4GKk2 VPvjqQSu4k8V8eFpjeHyamylgGpLYymjOktWnTpR2f4AYT6j3WTlmM35iF36dKNg/y smSEJbhjvJYq8WHuwuHvXm/E/kx5o/LNdK1th9x+gPldB0Lcjkun4+eeNmTYE4olFs Ze1U0dBUEsTRh8ODrzs8qtI7O3n4EnN0uE+ykLb8/3OKjIYtgptiROXprQylai8VZa 5IhlO2soO9t3A== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Ymh282Dh5z4wxm; Mon, 3 Feb 2025 20:26:08 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 1/6] vhost-user: Change different vhost-user messages to trace() level Date: Mon, 3 Feb 2025 20:26:10 +1100 Message-ID: <20250203092615.500163-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250203092615.500163-1-david@gibson.dropbear.id.au> References: <20250203092615.500163-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: LJDCTCTZIZPMJDFJC256N5JLBW6IHT7T X-Message-ID-Hash: LJDCTCTZIZPMJDFJC256N5JLBW6IHT7T X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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