diff options
-rw-r--r-- | sys/netinet/tcp_input.c | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 3 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 17 | ||||
-rw-r--r-- | sys/netinet/tcp_timewait.c | 17 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 4 |
5 files changed, 23 insertions, 21 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index bf0fd0c..eb459c2 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)tcp_input.c 8.5 (Berkeley) 4/10/94 - * $Id: tcp_input.c,v 1.24 1995/05/11 01:41:06 davidg Exp $ + * $Id: tcp_input.c,v 1.25 1995/05/30 08:09:55 rgrimes Exp $ */ #ifndef TUBA_INCLUDE @@ -1814,6 +1814,7 @@ tcp_xmit_timer(tp, rtt) register short delta; tcpstat.tcps_rttupdated++; + tp->t_rttupdated++; if (tp->t_srtt != 0) { /* * srtt is stored as fixed point with 3 bits after the diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index bf0fd0c..eb459c2 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * From: @(#)tcp_input.c 8.5 (Berkeley) 4/10/94 - * $Id: tcp_input.c,v 1.24 1995/05/11 01:41:06 davidg Exp $ + * $Id: tcp_input.c,v 1.25 1995/05/30 08:09:55 rgrimes Exp $ */ #ifndef TUBA_INCLUDE @@ -1814,6 +1814,7 @@ tcp_xmit_timer(tp, rtt) register short delta; tcpstat.tcps_rttupdated++; + tp->t_rttupdated++; if (tp->t_srtt != 0) { /* * srtt is stored as fixed point with 3 bits after the diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index b2f96a2..cf0fc40 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.1 (Berkeley) 6/10/93 - * $Id: tcp_subr.c,v 1.11 1995/05/30 08:09:58 rgrimes Exp $ + * $Id: tcp_subr.c,v 1.12 1995/06/19 16:45:33 wollman Exp $ */ #include <sys/param.h> @@ -303,18 +303,17 @@ tcp_close(tp) register struct rtentry *rt; /* - * If we sent enough data to get some meaningful characteristics, - * save them in the routing entry. 'Enough' is arbitrarily - * defined as the sendpipesize (default 4K) * 16. This would - * give us 16 rtt samples assuming we only get one sample per - * window (the usual case on a long haul net). 16 samples is - * enough for the srtt filter to converge to within 5% of the correct - * value; fewer samples and we could save a very bogus rtt. + * If we got enough samples through the srtt filter, + * save the rtt and rttvar in the routing entry. + * 'Enough' is arbitrarily defined as the 16 samples. + * 16 samples is enough for the srtt filter to converge + * to within 5% of the correct value; fewer samples and + * we could save a very bogus rtt. * * Don't update the default route's characteristics and don't * update anything that the user "locked". */ - if (SEQ_LT(tp->iss + so->so_snd.sb_hiwat * 16, tp->snd_max) && + if (tp->t_rttupdated >= 16 && (rt = inp->inp_route.ro_rt) && ((struct sockaddr_in *)rt_key(rt))->sin_addr.s_addr != INADDR_ANY) { register u_long i = 0; diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index b2f96a2..cf0fc40 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.1 (Berkeley) 6/10/93 - * $Id: tcp_subr.c,v 1.11 1995/05/30 08:09:58 rgrimes Exp $ + * $Id: tcp_subr.c,v 1.12 1995/06/19 16:45:33 wollman Exp $ */ #include <sys/param.h> @@ -303,18 +303,17 @@ tcp_close(tp) register struct rtentry *rt; /* - * If we sent enough data to get some meaningful characteristics, - * save them in the routing entry. 'Enough' is arbitrarily - * defined as the sendpipesize (default 4K) * 16. This would - * give us 16 rtt samples assuming we only get one sample per - * window (the usual case on a long haul net). 16 samples is - * enough for the srtt filter to converge to within 5% of the correct - * value; fewer samples and we could save a very bogus rtt. + * If we got enough samples through the srtt filter, + * save the rtt and rttvar in the routing entry. + * 'Enough' is arbitrarily defined as the 16 samples. + * 16 samples is enough for the srtt filter to converge + * to within 5% of the correct value; fewer samples and + * we could save a very bogus rtt. * * Don't update the default route's characteristics and don't * update anything that the user "locked". */ - if (SEQ_LT(tp->iss + so->so_snd.sb_hiwat * 16, tp->snd_max) && + if (tp->t_rttupdated >= 16 && (rt = inp->inp_route.ro_rt) && ((struct sockaddr_in *)rt_key(rt))->sin_addr.s_addr != INADDR_ANY) { register u_long i = 0; diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index c5f35d3..8a9c621 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_var.h 8.3 (Berkeley) 4/10/94 - * $Id: tcp_var.h,v 1.11 1995/04/09 01:29:29 davidg Exp $ + * $Id: tcp_var.h,v 1.12 1995/06/19 16:45:33 wollman Exp $ */ #ifndef _NETINET_TCP_VAR_H_ @@ -139,6 +139,8 @@ struct tcpcb { /* TUBA stuff */ caddr_t t_tuba_pcb; /* next level down pcb for TCP over z */ +/* More RTT stuff */ + u_long t_rttupdated; /* number of times rtt sampled */ }; /* |