* [PATCH] tcp: clarify comment for mdev_us in struct tcp_sock
@ 2026-08-05 13:19 Ziran Zhang
2026-08-06 8:28 ` Fernando Fernandez Mancera
0 siblings, 1 reply; 2+ messages in thread
From: Ziran Zhang @ 2026-08-05 13:19 UTC (permalink / raw)
To: Eric Dumazet, Neal Cardwell, Kuniyuki Iwashima
Cc: netdev, linux-kernel, Ziran Zhang
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tcp: clarify comment for mdev_us in struct tcp_sock
2026-08-05 13:19 [PATCH] tcp: clarify comment for mdev_us in struct tcp_sock Ziran Zhang
@ 2026-08-06 8:28 ` Fernando Fernandez Mancera
0 siblings, 0 replies; 2+ messages in thread
From: Fernando Fernandez Mancera @ 2026-08-06 8:28 UTC (permalink / raw)
To: Ziran Zhang, Eric Dumazet, Neal Cardwell, Kuniyuki Iwashima
Cc: netdev, linux-kernel
On 8/5/26 3:19 PM, Ziran Zhang wrote:
> 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>
Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de>
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-06 8:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-05 13:19 [PATCH] tcp: clarify comment for mdev_us in struct tcp_sock Ziran Zhang
2026-08-06 8:28 ` Fernando Fernandez Mancera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox