From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=dPq5FIf8; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 7AF385A0271 for ; Mon, 03 Feb 2025 07:10:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738563032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/nRkzsB66S3b69c6k1zvX6ADt+T4mX7+udiK+XmDgN8=; b=dPq5FIf85cYcDuGWXBpkaHjyF/2Kc0DVt1hYwsCOoW/0U00ETUitexQAk1BrRSK91Rjl7C ROrt4bz2QFVS1+f4f7ir2A7+cIAmlHwLuK8iZqtpbnWqJX+60mM8zDnt9i2ATy75FCcCUo fmlPod8/cZPFfoU2Of6rnuK+0LnJckM= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-146-UKXMmx8WO2iKAurYn2rgHw-1; Mon, 03 Feb 2025 01:10:30 -0500 X-MC-Unique: UKXMmx8WO2iKAurYn2rgHw-1 X-Mimecast-MFC-AGG-ID: UKXMmx8WO2iKAurYn2rgHw Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4362153dcd6so18672445e9.2 for ; Sun, 02 Feb 2025 22:10:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738563029; x=1739167829; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/nRkzsB66S3b69c6k1zvX6ADt+T4mX7+udiK+XmDgN8=; b=hgfPJLUEfKgEoiNYDmoPwZZga6AdhyDRZD2fYw4vkiBvnrkOisrSLHt/WcENXpd3+k 8oYy9c9pDuwn7cFDOGF2xbv1EaiAFL4JMRydMf1mny99bjmkf0ufVlIOTL+U2CcdRfCW ZFScJjGkjE3qNFt9ifWnN6OcCYQJOwizIMYUsnJfuuZcEgQ5JAe0MdaYT/4Z9HreHLwL x7DxX0NWp7NBLUNCrniZ4inbz9I1a3Ixhqr1QCBiTEWCDEhMRymtG6ioNBO4ZCMgaRQv cZe69flOvAd6Y5J8pzTnzViAXHfiRqS5e1z0XoqtQ5BxO9XULSGgYzcc8uHJxGjQ/gnQ 9vvg== X-Gm-Message-State: AOJu0Yw+pVkivz+7rvOgmhaeYpUV8HYcpqKmS+5naSEk2jy+MQN+0Bv6 o9zgJva6lzkg3mvWS/suUWAY4LfwX/wGgcB7M4jRzzj56odRLJu6/gkC5fLgy/XmxFI61lZtyl7 zVpZIHfemIdYrMeUFWSQJN3Si/W/HnWsq8YGJ1GKPg3AWG/gTtw== X-Gm-Gg: ASbGnctbAzGJp3fPcK8nOin76vOVHAglPS4ZRIDE+RS9cUhAF6oBdFHPaF49/33eBth 5tx5WNg5EkteeWq9jpCds0qOTJX8b0QNLwiRlugJKOcr/vxf4OsITqwK0xchsRNgMnBXjTGagaz x4R5+6AapVDtoUPRrJxLqNCstz199KGEjsVlEzrv2Upz9FLhoR0u5vLMpCjBp1ZOrcydgcZ8xZt 27W7Xu+v6GX5Jq1N95F666dDW5HyWN85kAlVvPWR8C3G5YzYUwiasM3SzJeNfMb4vjdnCrB9yJ3 HHfHyaAGPkPuD3O3FHgjlHkxepPOnNjUkA== X-Received: by 2002:a05:600c:1c29:b0:434:e9ee:c1e with SMTP id 5b1f17b1804b1-438dc43625bmr179223825e9.31.1738563029518; Sun, 02 Feb 2025 22:10:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGdIU62nhajVaQ9ld/HqMh2Ij8GNrdUYfx3GlutDE8ZEeBDmRzKesQpD/cYp8xGNyV8WmTYCQ== X-Received: by 2002:a05:600c:1c29:b0:434:e9ee:c1e with SMTP id 5b1f17b1804b1-438dc43625bmr179223585e9.31.1738563029139; Sun, 02 Feb 2025 22:10:29 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438e245f4a8sm144616105e9.37.2025.02.02.22.10.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Feb 2025 22:10:27 -0800 (PST) Date: Mon, 3 Feb 2025 07:10:25 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v3 16/20] vhost_user: Turn vhost-user message reports to trace() Message-ID: <20250203071025.706bf40e@elisabeth> In-Reply-To: References: <20250131193953.3034031-1-sbrivio@redhat.com> <20250131193953.3034031-17-sbrivio@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: nyN-k_V3EEbTBCr3Nb3kmPr8t-8SkHPhzHFtHuVxh_4_1738563030 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: FFTVYOI37XAWIPIPWJSJUKG33CW3UGSL X-Message-ID-Hash: FFTVYOI37XAWIPIPWJSJUKG33CW3UGSL X-MailFrom: sbrivio@redhat.com 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: passt-dev@passt.top, Laurent Vivier 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: On Mon, 3 Feb 2025 14:11:10 +1100 David Gibson wrote: > On Fri, Jan 31, 2025 at 08:39:49PM +0100, Stefano Brivio wrote: > > Having every vhost-user message printed as part of debug output makes > > debugging anything else a bit complicated. > > > > Signed-off-by: Stefano Brivio > > I'm a little bit baffled by this. You're changing to trace() a couple > of relatively rare messages Well, "rare" is relative, if you're debugging state migration transfers. :) But... > that I think belong in debug() category, actually, yes, they're not so frequent. Probably we should improve on the reporting instead, because good luck finding your little message with transferred sizes in a rain of: ================ Vhost user message ================ we probably need a simple facility in vhost-user code allowing to start and continue some messages, so that if we need two lines here for "vhost-user: req %s (%d)\nflags: ..." we can do that easily. As long as we're single-threaded, by the way, this could be simply two calls to debug(). > but *not* changing some things that definitely should be trace() - > such as the ones in vu_send_single() and vu_kick_cb(). Right, also noted for follow-ups. > > --- > > vhost_user.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/vhost_user.c b/vhost_user.c > > index 2dde405..1092387 100644 > > --- a/vhost_user.c > > +++ b/vhost_user.c > > @@ -640,8 +640,8 @@ static bool vu_set_vring_num_exec(struct vu_dev *vdev, > > unsigned int idx = msg->payload.state.index; > > unsigned int num = msg->payload.state.num; > > > > - debug("State.index: %u", idx); > > - debug("State.num: %u", num); > > + trace("State.index: %u", idx); > > + trace("State.num: %u", num); > > vdev->vq[idx].vring.num = num; > > > > return false; > > @@ -1176,11 +1176,11 @@ void vu_control_handler(struct vu_dev *vdev, int fd, uint32_t events) > > vu_sock_reset(vdev); > > return; > > } > > - debug("================ Vhost user message ================"); > > - debug("Request: %s (%d)", vu_request_to_string(msg.hdr.request), > > + trace("================ Vhost user message ================"); > > + trace("Request: %s (%d)", vu_request_to_string(msg.hdr.request), > > msg.hdr.request); > > - debug("Flags: 0x%x", msg.hdr.flags); > > - debug("Size: %u", msg.hdr.size); > > + trace("Flags: 0x%x", msg.hdr.flags); > > + trace("Size: %u", msg.hdr.size); > > > > need_reply = msg.hdr.flags & VHOST_USER_NEED_REPLY_MASK; -- Stefano