summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timewait.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-06-19 16:45:33 +0000
committerwollman <wollman@FreeBSD.org>1995-06-19 16:45:33 +0000
commita1aa4b6c803d61e08c672ed170fb6dd85a00772f (patch)
tree393189ae6d0573852a4a88c1ad9cf03f1c79436b /sys/netinet/tcp_timewait.c
parent4e33c8eed30fa60dfd518a6a7fdf5c7eceeabd57 (diff)
downloadFreeBSD-src-a1aa4b6c803d61e08c672ed170fb6dd85a00772f.zip
FreeBSD-src-a1aa4b6c803d61e08c672ed170fb6dd85a00772f.tar.gz
Now that we've gone to all sorts of effort to allow TCP to cache some of
its connection parameters, we want to keep statistics on how often this actually happens to see whether there is any work that needs to be done in TCP itself. Suggested by: John Wroclawski <jtw@lcs.mit.edu>
Diffstat (limited to 'sys/netinet/tcp_timewait.c')
-rw-r--r--sys/netinet/tcp_timewait.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 381824d..b2f96a2 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.10 1995/04/09 01:29:26 davidg Exp $
+ * $Id: tcp_subr.c,v 1.11 1995/05/30 08:09:58 rgrimes Exp $
*/
#include <sys/param.h>
@@ -333,6 +333,7 @@ tcp_close(tp)
(rt->rt_rmx.rmx_rtt + i) / 2;
else
rt->rt_rmx.rmx_rtt = i;
+ tcpstat.tcps_cachedrtt++;
}
if ((rt->rt_rmx.rmx_locks & RTV_RTTVAR) == 0) {
i = tp->t_rttvar *
@@ -342,6 +343,7 @@ tcp_close(tp)
(rt->rt_rmx.rmx_rttvar + i) / 2;
else
rt->rt_rmx.rmx_rttvar = i;
+ tcpstat.tcps_cachedrttvar++;
}
/*
* update the pipelimit (ssthresh) if it has been updated
@@ -366,6 +368,7 @@ tcp_close(tp)
(rt->rt_rmx.rmx_ssthresh + i) / 2;
else
rt->rt_rmx.rmx_ssthresh = i;
+ tcpstat.tcps_cachedssthresh++;
}
}
#endif /* RTV_RTT */
OpenPOWER on IntegriCloud