From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine 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=IhNKssgl; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 50AD65A0265 for ; Thu, 17 Sep 2026 21:08:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1789672103; 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=w4xdbteXs4ken9/czWPPg/GQN57JNibEpkvR7GnNimQ=; b=IhNKssgl6Qp4N8xYzrXFtYj4i/HV/DRtlwrL2jDEZ/aBurYfylVoNKASY/cjXsTWzgrZcW xlFyZT486iF/Oq/tXQhpn1AcXcVMtcAKMx76+hqmYeVvTFYQ28qdPctyLxlLUovCB9+jqb DDV4NQ8BmCV3/ViBHQ5HSOnTp874dOI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-153-UAGR8k83PQKNHgmSe6NmAw-1; Thu, 17 Sep 2026 15:08:21 -0400 X-MC-Unique: UAGR8k83PQKNHgmSe6NmAw-1 X-Mimecast-MFC-AGG-ID: UAGR8k83PQKNHgmSe6NmAw_1789672100 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-486e90b59a6so679041f8f.3 for ; Thu, 17 Sep 2026 12:08:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789672100; x=1790276900; h=date:content-transfer-encoding:content-type:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=w4xdbteXs4ken9/czWPPg/GQN57JNibEpkvR7GnNimQ=; b=fN66yVrmSatXWV/IM/lwpSP6L7NufYzbatGzZtjFsCmLhViV/nkULGLdvXfojbsqHh 9GNMX54Q6LqPzWvuK5/bYiSmfQ91caaXqlBvxXk/q3jGINQeNC9XKqfxCDnPWe2UzjUH TKFBgeFvpx5OVMhGAMqA6PvI1QMcXJNYz4MFfCmJDzgwno58uGjX++ZZkq3sb6oLbEJk Aklin0WGrE1zBl9aBIVjwfQyJa9nAtpc5PyTFaRLX7OFyhTuwU5RaRmXZz99E5bEotNg UdGdFGP3BFvUiWi5Wmf4Oi12Ge8R9y3ixCbtAo1xF+xLluIrnlKxyHJlZIlQkc7DbZId yfvg== X-Gm-Message-State: AFuF++nWsRoHTEiWO41F2cx32mvSWBQCWN0e7IWBoyUUpVCJt8XBxhRc M3pfopfFgCHrTVtAy0qTJ877lYoES83f4ujTWMzFqq53YJJxLfad5LDenPO3f9RAGCt0SLCWQ1r 7atgpzE+wqc+0YyxU4wqeWd+cmp5u0GScoPc3yReqqWEpWCDyR9daOJo9OAuZHQ== X-Gm-Gg: AYBFou05wsy558UZLyD9ErrKc9A90NsuP1mDizrTJCQDWFqphk3creHeMy7FeB83y+U lf0vf9TFPusXSmMXQVCGy1WVuhcnlw3BaTWaw0iIuk/QQWI6/YUgf+uBqq8h3lo7jbCIIdsr3Ur kQZwXCuXo4MP9hxkr5Sh057qCtyalxXtWhw+UWNRnw/isJ3c2qdJ3wZdrrC+0uGkipcGCHzJCjn BoDfxjkgiEqvDk+91qG1XNi7mYDx1nPFJQIWCVrvPuqDvIGwXIptA9ZAZJfb72jo15HBpkWViIs EkE8Vp6CHc/FifMwIX5bKkrzrijd9QdxbyXEhVeRH0s/lxBvCLXl1nzuzoA8J7kWfWRVZb0SGYC p8DMQ3ur+aISfTAVdr1lNlwuKESst X-Received: by 2002:a05:6000:27d4:b0:487:463:92d3 with SMTP id ffacd0b85a97d-4870cf16ebdmr6453510f8f.20.1789672100292; Thu, 17 Sep 2026 12:08:20 -0700 (PDT) X-Received: by 2002:a05:6000:27d4:b0:487:463:92d3 with SMTP id ffacd0b85a97d-4870cf16ebdmr6453490f8f.20.1789672099853; Thu, 17 Sep 2026 12:08:19 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4870bf3494dsm16707220f8f.28.2026.09.17.12.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2026 12:08:19 -0700 (PDT) From: Stefano Brivio To: Martin Schitter Subject: Re: [PATCH v2 2/3] Timekeeping: Resolving Route Dependencies Message-ID: <20260917210818.4900083a@elisabeth> In-Reply-To: <20260908181631.537802-3-ms+git@mur.at> References: <20260908181631.537802-1-ms+git@mur.at> <20260908181631.537802-3-ms+git@mur.at> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Thu, 17 Sep 2026 21:08:19 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: du3XR-sXi8mpsE6qUhNVn_h81BBJPb1ySq09wm3XSW0_1789672100 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: MCB3Z5MSSYESPGPJN27LJ5TF357FFFID X-Message-ID-Hash: MCB3Z5MSSYESPGPJN27LJ5TF357FFFID 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 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 Tue, 8 Sep 2026 18:13:13 +0000 Martin Schitter wrote: > --- > netlink.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/netlink.c b/netlink.c > index 650a6fd..65cc5d7 100644 > --- a/netlink.c > +++ b/netlink.c > @@ -18,6 +18,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -604,6 +605,7 @@ int nl_route_dup(int s_src, unsigned int ifi_src, > char buf[NLBUFSIZ * 8]; > uint32_t seq; > unsigned i; > + struct timespec start, now; > > seq = nl_send(s_src, &req, RTM_GETROUTE, NLM_F_DUMP, sizeof(req)); > > @@ -706,6 +708,7 @@ int nl_route_dup(int s_src, unsigned int ifi_src, > * can safely ignore that and repeat the requests. This avoids the need > * to calculate dependencies: let the kernel do that. > */ > + clock_gettime(CLOCK_MONOTONIC, &start); This adds overhead (even if minimal) in a general case, but it's only used for debug() messages. > for (i = 0; i < dup_routes; i++) { > for (nh = (struct nlmsghdr *)buf, left = nlmsgs_size; > NLMSG_OK(nh, left); > @@ -724,6 +727,9 @@ int nl_route_dup(int s_src, unsigned int ifi_src, > return rc; > } > } > + clock_gettime(CLOCK_MONOTONIC, &now); > + debug("route dependency handling time: %f s", > + (now.tv_sec - start.tv_sec) + (now.tv_nsec - start.tv_nsec)/1.0e9); And anyway, I'm not sure I see the value of this. Which other functions should we profile? Does it help at all to do this once you're done developing it? I would suggest to simply drop this patch. I understand you needed that for development but you already explain in the commit message for 3/3 how it improves thing, and that's all the documentation we possibly need for the future, I think. > > return 0; > } -- Stefano