Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102177148
D44612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44612.diff
View Options
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -4240,19 +4240,19 @@
uint32_t val, frac;
val = USEC_2_TICKS(tp->t_rttvar);
- frac = tp->t_srtt % (HPTS_USEC_IN_SEC / hz);
+ frac = tp->t_rttvar % (HPTS_USEC_IN_SEC / hz);
tp->t_rttvar = val << TCP_RTTVAR_SHIFT;
/*
* frac is the fractional part here is left
* over from converting to hz and shifting.
- * We need to convert this to the 5 bit
+ * We need to convert this to the 4 bit
* remainder.
*/
if (frac) {
if (hz == 1000) {
- frac = (((uint64_t)frac * (uint64_t)TCP_RTT_SCALE) / (uint64_t)HPTS_USEC_IN_MSEC);
+ frac = (((uint64_t)frac * (uint64_t)TCP_RTTVAR_SCALE) / (uint64_t)HPTS_USEC_IN_MSEC);
} else {
- frac = (((uint64_t)frac * (uint64_t)(hz) * (uint64_t)TCP_RTT_SCALE) /(uint64_t)HPTS_USEC_IN_SEC);
+ frac = (((uint64_t)frac * (uint64_t)(hz) * (uint64_t)TCP_RTTVAR_SCALE) /(uint64_t)HPTS_USEC_IN_SEC);
}
tp->t_rttvar += frac;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 1:38 PM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14561194
Default Alt Text
D44612.diff (1 KB)
Attached To
Mode
D44612: tcp: fix conversion of rttvar
Attached
Detach File
Event Timeline
Log In to Comment