From: Ziran Zhang <zhangcoder@yeah.net>
To: Eric Dumazet <edumazet@google.com>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Ziran Zhang <zhangcoder@yeah.net>
Subject: [PATCH] tcp: clarify comment for mdev_us in struct tcp_sock
Date: Wed, 5 Aug 2026 21:19:27 +0800 [thread overview]
Message-ID: <20260805131927.27661-1-zhangcoder@yeah.net> (raw)
The existing comment for mdev_us says "medium deviation", but this
term is inaccurate. The field stores the "mean deviation" of RTT,
as originally defined in Van Jacobson's paper "Congestion
Avoidance and Control", and it is scaled by 4 (<< 2) in the Linux
implementation.
Update the comment to reflect the correct terminology and storage
format.
Signed-off-by: Ziran Zhang <zhangcoder@yeah.net>
---
include/linux/tcp.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 8a6807082..6a8c77719 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -274,7 +274,7 @@ struct tcp_sock {
u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
u32 pushed_seq; /* Last pushed seq, required to talk to windows */
u32 lsndtime; /* timestamp of last sent data packet (for restart window) */
- u32 mdev_us; /* medium deviation */
+ u32 mdev_us; /* mean deviation of RTT, scaled by 4 (<< 2) in usecs */
u32 rtt_seq; /* sequence number to update rttvar */
u32 max_packets_out; /* max packets_out in last window */
u32 cwnd_usage_seq; /* right edge of cwnd usage tracking flight */
--
2.51.0
next reply other threads:[~2026-08-05 13:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 13:19 Ziran Zhang [this message]
2026-08-06 8:28 ` [PATCH] tcp: clarify comment for mdev_us in struct tcp_sock Fernando Fernandez Mancera
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=20260805131927.27661-1-zhangcoder@yeah.net \
--to=zhangcoder@yeah.net \
--cc=edumazet@google.com \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox