From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>, passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 1/2] tcp: Correct timer expiry value in trace message
Date: Wed, 10 Dec 2025 18:02:56 +1100 [thread overview]
Message-ID: <20251210070257.1775739-2-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20251210070257.1775739-1-david@gibson.dropbear.id.au>
000601ba8 ("tcp: Adaptive interval based on RTT for socket-side
acknowledgement checks") added (amongst other things) a new trace message
showing the expiry time for the TCP timer in ms rather than s.
Unfortunately there were some arithmetic errors in the message, meaning it
will print incorrect numbers. Correct them
Fixes: 000601ba86da ("tcp: Adaptive interval based on RTT for socket-side acknowledgement checks")
Link: https://bugs.passt.top/show_bug.cgi?id=182
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
tcp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tcp.c b/tcp.c
index 8dabfd30..ce36bbd3 100644
--- a/tcp.c
+++ b/tcp.c
@@ -626,11 +626,11 @@ static void tcp_timer_ctl(const struct ctx *c, struct tcp_tap_conn *conn)
}
if (conn->flags & ACK_TO_TAP_DUE) {
- flow_trace(conn, "timer expires in %llu.%03llums",
- (unsigned long)it.it_value.tv_sec * 1000 +
- (unsigned long long)it.it_value.tv_nsec %
- ((long)1000 * 1000),
- (unsigned long long)it.it_value.tv_nsec / 1000);
+ flow_trace(conn, "timer expires in %llu.%02llums",
+ (unsigned long long)it.it_value.tv_sec * 1000 +
+ it.it_value.tv_nsec / 1000 / 1000,
+ (unsigned long long)it.it_value.tv_nsec
+ / 1000 / 10 % 100);
} else {
flow_dbg(conn, "timer expires in %llu.%03llus",
(unsigned long long)it.it_value.tv_sec,
--
2.52.0
next prev parent reply other threads:[~2025-12-10 7:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 7:02 [PATCH 0/2] Bug 181 & bug 182 David Gibson
2025-12-10 7:02 ` David Gibson [this message]
2025-12-10 7:02 ` [PATCH 2/2] pif: Correctly set scope_id for guest-side link local addresses David Gibson
2025-12-10 13:36 ` [PATCH 0/2] Bug 181 & bug 182 Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251210070257.1775739-2-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).