summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-07-10 15:39:16 +0000
committerwollman <wollman@FreeBSD.org>1995-07-10 15:39:16 +0000
commitae6523c0e56b8a74212d0ae29b9a90665a97064a (patch)
tree82fd7fed6feb73b9e9be46d5741ba725a08ab0c9 /sys/netinet/tcp_input.c
parentd3e9d64ff6195ae0b8325862d35eb96d66c16b05 (diff)
downloadFreeBSD-src-ae6523c0e56b8a74212d0ae29b9a90665a97064a.zip
FreeBSD-src-ae6523c0e56b8a74212d0ae29b9a90665a97064a.tar.gz
tcp_input.c - keep track of how many times a route contained a cached rtt
or ssthresh that we were able to use tcp_var.h - declare tcpstat entries for above; declare tcp_{send,recv}space in_rmx.c - fill in the MTU and pipe sizes with the defaults TCP would have used anyway in the absence of values here
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index eb459c2..eb2f346 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.25 1995/05/30 08:09:55 rgrimes Exp $
+ * $Id: tcp_input.c,v 1.26 1995/06/29 18:11:22 wollman Exp $
*/
#ifndef TUBA_INCLUDE
@@ -1950,7 +1950,6 @@ tcp_mss(tp, offer)
offer = max(offer, 64);
taop->tao_mssopt = offer;
-#ifdef RTV_MTU /* if route characteristics exist ... */
/*
* While we're here, check if there's an initial rtt
* or rttvar. Convert from the route-table units
@@ -1964,13 +1963,16 @@ tcp_mss(tp, offer)
if (rt->rt_rmx.rmx_locks & RTV_RTT)
tp->t_rttmin = rtt / (RTM_RTTUNIT / PR_SLOWHZ);
tp->t_srtt = rtt / (RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTT_SCALE));
- if (rt->rt_rmx.rmx_rttvar)
+ tcpstat.tcps_usedrtt++;
+ if (rt->rt_rmx.rmx_rttvar) {
tp->t_rttvar = rt->rt_rmx.rmx_rttvar /
(RTM_RTTUNIT / (PR_SLOWHZ * TCP_RTTVAR_SCALE));
- else
+ tcpstat.tcps_usedrttvar++;
+ } else {
/* default variation is +- 1 rtt */
tp->t_rttvar =
tp->t_srtt * TCP_RTTVAR_SCALE / TCP_RTT_SCALE;
+ }
TCPT_RANGESET(tp->t_rxtcur,
((tp->t_srtt >> 2) + tp->t_rttvar) >> 1,
tp->t_rttmin, TCPTV_REXMTMAX);
@@ -1981,7 +1983,6 @@ tcp_mss(tp, offer)
if (rt->rt_rmx.rmx_mtu)
mss = rt->rt_rmx.rmx_mtu - sizeof(struct tcpiphdr);
else
-#endif /* RTV_MTU */
{
mss = ifp->if_mtu - sizeof(struct tcpiphdr);
if (!in_localaddr(inp->inp_faddr))
@@ -2054,7 +2055,6 @@ tcp_mss(tp, offer)
if (!in_localaddr(inp->inp_faddr))
tp->snd_cwnd = mss;
-#ifdef RTV_SSTHRESH
if (rt->rt_rmx.rmx_ssthresh) {
/*
* There's some sort of gateway or interface
@@ -2063,8 +2063,8 @@ tcp_mss(tp, offer)
* threshold to no less than 2*mss.
*/
tp->snd_ssthresh = max(2 * mss, rt->rt_rmx.rmx_ssthresh);
+ tcpstat.tcps_usedssthresh++;
}
-#endif
}
/*
OpenPOWER on IntegriCloud