From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id F41DAB875; Sun, 21 Jun 2026 10:57:15 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 6D56AB78E; Sun, 21 Jun 2026 10:57:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail.cyberchaos.dev (mail.cyberchaos.dev [195.39.247.168]) by atuin.qyliss.net (Postfix) with ESMTPS id 64FFEB78D for ; Sun, 21 Jun 2026 10:57:10 +0000 (UTC) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuka.dev; s=mail; t=1782039428; 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=AsgPeBB+zZC7G1pZ41EvXc6IdWd98XpElPW31FCwDU4=; b=ikgUSJVM6ndgOpng8qtq3emDFs5sd4DHRuaDP2rh4JklejDwGqLd5vHILyua5ph6zKyJiS rUm0AES2IF0j1UAnU26IH36zUrqa4GTPX4nw2H9MDA3pOvK7kLLjFkBMeUAcuhv433WJhn e67To24Rr3qjjbm29etP4yu9LpcjdOQ= Date: Sun, 21 Jun 2026 12:57:05 +0200 MIME-Version: 1.0 Subject: Re: [PATCH] tools/router: trace unicast packets To: hi@alyssa.is References: <20260619130940.273236-1-hi@alyssa.is> Content-Language: en-US From: Yureka In-Reply-To: <20260619130940.273236-1-hi@alyssa.is> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID-Hash: BNR67E5EUK5MXI4DSQFCTWR6VHVO3JIJ X-Message-ID-Hash: BNR67E5EUK5MXI4DSQFCTWR6VHVO3JIJ X-MailFrom: yuka@yuka.dev X-Mailman-Rule-Hits: member-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; emergency CC: devel@spectrum-os.org X-Mailman-Version: 3.3.10 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 6/19/26 15:09, Alyssa Ross wrote: > I found this useful for debugging. > ("Is it actually sending anything?") > > Signed-off-by: Alyssa Ross > --- > tools/router/src/router.rs | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/router/src/router.rs b/tools/router/src/router.rs > index a91e4155..f36866d8 100644 > --- a/tools/router/src/router.rs > +++ b/tools/router/src/router.rs > @@ -11,7 +11,7 @@ use crate::packet::*; > use crate::protocol::*; > > use futures_util::{FutureExt, Sink, SinkExt, Stream, StreamExt}; > -use log::{debug, info, warn}; > +use log::{debug, info, trace, warn}; > use tokio_stream::StreamMap; > use vhost_device_net::IncomingPacket; > use vm_memory::GuestMemory; > @@ -128,6 +128,7 @@ impl Router { > .await?; > } > ref unicast => { > + trace!("got unicast packet {:?} -> {:?}", in_iface, out_iface); > let Some(sink) = self.sinks.get_mut(unicast) else { > warn!("dropped packet because interface is not ready"); > continue; > > base-commit: 57bf21eaf65ca5a42d18999ba65f96dcd338113c In general useful, yes. I think logging on this level could affect performance (even if disabled at run-time). There is some crate feature of the log crate to conditionally compile the trace log level for debug builds. — Yureka