diff options
author | 2005-02-27 13:22:56 +0000 | |
---|---|---|
committer | 2005-02-27 13:22:56 +0000 | |
commit | c988193cc833c27d27f8f2428ef23b0ac7e07a5e (patch) | |
tree | b6912813bc5f8ac76de648e49834c89aff8b0165 /sys/netinet/tcp_output.c | |
parent | where possible, use bzero instead of memset (diff) | |
download | wireguard-openbsd-c988193cc833c27d27f8f2428ef23b0ac7e07a5e.tar.xz wireguard-openbsd-c988193cc833c27d27f8f2428ef23b0ac7e07a5e.zip |
1. tcp_xmit_timer(): remove extra rtt decrement (t_rtttime is 0-based
while t_rtt was 1-based), update callers
2. define and use TCP_RTT_BASE_SHIFT instead of the hardcoded 2.
3. add missing shifts when t_srtt/t_rttvar are used.
4. update the comments: t_srtt uses 5 bits of fraction (not 3)
and t_rttvar uses 4 bits
5. remove obsolete/unused macros TCP_RTT_SCALE and TCP_RTTVAR_SCALE
6. make sure rttmin is not > TCPTV_REXMTMAX
parts from netbsd, ok mcbride, henning
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r-- | sys/netinet/tcp_output.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 2c8fe2236b9..97d3d1f5929 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_output.c,v 1.74 2004/10/28 19:22:52 mcbride Exp $ */ +/* $OpenBSD: tcp_output.c,v 1.75 2005/02/27 13:22:56 markus Exp $ */ /* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */ /* @@ -1167,7 +1167,7 @@ out: void tcp_setpersist(struct tcpcb *tp) { - int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> 1; + int t = ((tp->t_srtt >> 2) + tp->t_rttvar) >> (1 + TCP_RTT_BASE_SHIFT); int nticks; if (TCP_TIMER_ISARMED(tp, TCPT_REXMT)) |