From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=mur.at Authentication-Results: passt.top; dkim=pass (3072-bit key; unprotected) header.d=mur.at header.i=@mur.at header.a=rsa-sha256 header.s=dkim2 header.b=FUVaWq8R; dkim-atps=neutral Received: from efeu.mur.at (efeu.mur.at [89.106.208.42]) by passt.top (Postfix) with ESMTPS id B59B35A0274 for ; Tue, 08 Sep 2026 20:16:57 +0200 (CEST) Received: from raspi4 (lan1.raspi.ma39.ffgraz.net [10.12.1.243]) by efeu.mur.at (Postfix) with ESMTPSA id 265DA46F28; Tue, 8 Sep 2026 20:16:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mur.at; s=dkim2; t=1788891417; bh=4htsfjDnXoFQAh+WMKlLT9vMTC+ggfve2v8t2a9jEW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FUVaWq8R8pfdtTjuRk6IVkox0c8UpCIUcZBvjZhx7Y4UhN4OazXzKjoYRQa3b6Idt OA5xtI0Zea45wvn+RHFMVQTuFCXyHPQvr1MfCgcRn7eU1HHIDJJRqn6w2ofxYvoqQ0 HU/l2sxGNJv91ZtbNoPIPXx4qVTn3X+7Yu5IFF+yu4BsTeU30a21c4nJvBSFP78C+K K5R018ZCescAYrsfJbsfhqi9BdGV3lSL/BtpWZYetWvPuCEOqSEDSSAw91DUo0AvVj kFr5FqVyppzKQ22iXR4Sja7r8KQBBwfw/tvWWlplbhqWe5Do3xnxExYqFMO9CbME4G UsQpS0fUi5kGgN1tnd2boWEdhafOTPCMO6jO8G5MOtSxXjki+4FEJL6UjkxVWBHkDF x0iZFCA+YoMouvkI3Hokno4eYFu4iXDkZ8PucNjf8zrMrFjoWzoE76f+f5bE2NsV7C 3ElF6cLhzxkAyUr22d7jH8IHbSSvQ45enSHBeCoHh2Zs+y1O2U1 From: Martin Schitter To: passt-dev@passt.top Subject: [PATCH v2 2/3] Timekeeping: Resolving Route Dependencies Date: Tue, 8 Sep 2026 18:13:13 +0000 Message-ID: <20260908181631.537802-3-ms+git@mur.at> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260908181631.537802-1-ms+git@mur.at> References: <20260908181631.537802-1-ms+git@mur.at> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MailFrom: ms+git@mur.at X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: 3LSG4LHMCGZIGJ5OAWZIYRKA67YHX4QQ X-Message-ID-Hash: 3LSG4LHMCGZIGJ5OAWZIYRKA67YHX4QQ X-Mailman-Approved-At: Tue, 08 Sep 2026 22:39:37 +0200 CC: Martin Schitter 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: --- 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); 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); return 0; } -- 2.53.0