Page MenuHomeFreeBSD

D44612.diff
No OneTemporary

D44612.diff

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

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)

Event Timeline