diff options
-rw-r--r-- | sys/netinet/tcp_subr.c | 10 | ||||
-rw-r--r-- | sys/netinet/tcp_timer.h | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_timewait.c | 10 |
3 files changed, 10 insertions, 13 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index c3100f3..09ae868 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 - * $Id: tcp_subr.c,v 1.28 1996/03/27 18:23:16 wollman Exp $ + * $Id: tcp_subr.c,v 1.29 1996/06/05 16:57:37 wollman Exp $ */ #include <sys/param.h> @@ -266,15 +266,13 @@ tcp_newtcpcb(inp) tp->t_inpcb = inp; /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no - * rtt estimate. Set rttvar so that srtt + 2 * rttvar gives + * rtt estimate. Set rttvar so that srtt + 4 * rttvar gives * reasonable initial retransmit time. */ tp->t_srtt = TCPTV_SRTTBASE; - tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << TCP_RTTVAR_SHIFT; + tp->t_rttvar = ((TCPTV_RTOBASE - TCPTV_SRTTBASE) << TCP_RTTVAR_SHIFT) / 4; tp->t_rttmin = TCPTV_MIN; - TCPT_RANGESET(tp->t_rxtcur, - ((TCPTV_SRTTBASE >> 2) + (TCPTV_SRTTDFLT << 2)) >> 1, - TCPTV_MIN, TCPTV_REXMTMAX); + tp->t_rxtcur = TCPTV_RTOBASE; tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT; inp->inp_ip.ip_ttl = ip_defttl; diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index c7e315f..f431b01 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_timer.h 8.1 (Berkeley) 6/10/93 - * $Id: tcp_timer.h,v 1.7 1995/11/14 20:34:45 phk Exp $ + * $Id: tcp_timer.h,v 1.8 1996/01/30 22:58:29 mpp Exp $ */ #ifndef _NETINET_TCP_TIMER_H_ @@ -90,6 +90,7 @@ #define TCPTV_MSL ( 30*PR_SLOWHZ) /* max seg lifetime (hah!) */ #define TCPTV_SRTTBASE 0 /* base roundtrip time; if 0, no idea yet */ +#define TCPTV_RTOBASE ( 3*PR_SLOWHZ) /* assumed RTO if no info */ #define TCPTV_SRTTDFLT ( 3*PR_SLOWHZ) /* assumed RTT if no info */ #define TCPTV_PERSMIN ( 5*PR_SLOWHZ) /* retransmit persistence */ diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index c3100f3..09ae868 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 - * $Id: tcp_subr.c,v 1.28 1996/03/27 18:23:16 wollman Exp $ + * $Id: tcp_subr.c,v 1.29 1996/06/05 16:57:37 wollman Exp $ */ #include <sys/param.h> @@ -266,15 +266,13 @@ tcp_newtcpcb(inp) tp->t_inpcb = inp; /* * Init srtt to TCPTV_SRTTBASE (0), so we can tell that we have no - * rtt estimate. Set rttvar so that srtt + 2 * rttvar gives + * rtt estimate. Set rttvar so that srtt + 4 * rttvar gives * reasonable initial retransmit time. */ tp->t_srtt = TCPTV_SRTTBASE; - tp->t_rttvar = tcp_rttdflt * PR_SLOWHZ << TCP_RTTVAR_SHIFT; + tp->t_rttvar = ((TCPTV_RTOBASE - TCPTV_SRTTBASE) << TCP_RTTVAR_SHIFT) / 4; tp->t_rttmin = TCPTV_MIN; - TCPT_RANGESET(tp->t_rxtcur, - ((TCPTV_SRTTBASE >> 2) + (TCPTV_SRTTDFLT << 2)) >> 1, - TCPTV_MIN, TCPTV_REXMTMAX); + tp->t_rxtcur = TCPTV_RTOBASE; tp->snd_cwnd = TCP_MAXWIN << TCP_MAX_WINSHIFT; tp->snd_ssthresh = TCP_MAXWIN << TCP_MAX_WINSHIFT; inp->inp_ip.ip_ttl = ip_defttl; |