summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2003-11-20 20:07:39 +0000
committerandre <andre@FreeBSD.org>2003-11-20 20:07:39 +0000
commit6164d7c280688f20cf827e8374984c6e0175fab0 (patch)
treef947a08d66395dd498056038f0c360783fa281c7 /sys/netinet/tcp_timer.c
parent6dca20de0718f19b3cdc5a7d5ebb71cd54b2374e (diff)
downloadFreeBSD-src-6164d7c280688f20cf827e8374984c6e0175fab0.zip
FreeBSD-src-6164d7c280688f20cf827e8374984c6e0175fab0.tar.gz
Introduce tcp_hostcache and remove the tcp specific metrics from
the routing table. Move all usage and references in the tcp stack from the routing table metrics to the tcp hostcache. It caches measured parameters of past tcp sessions to provide better initial start values for following connections from or to the same source or destination. Depending on the network parameters to/from the remote host this can lead to significant speedups for new tcp connections after the first one because they inherit and shortcut the learning curve. tcp_hostcache is designed for multiple concurrent access in SMP environments with high contention and is hash indexed by remote ip address. It removes significant locking requirements from the tcp stack with regard to the routing table. Reviewed by: sam (mentor), bms Reviewed by: -net, -current, core@kame.net (IPv6 parts) Approved by: re (scottl)
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 1a253ab..1eeb66e 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -551,10 +551,8 @@ tcp_timer_rexmt(xtp)
if ((tp->t_state == TCPS_SYN_SENT) && (tp->t_rxtshift == 3))
tp->t_flags &= ~(TF_REQ_SCALE|TF_REQ_TSTMP|TF_REQ_CC);
/*
- * If losing, let the lower level know and try for
- * a better route. Also, if we backed off this far,
- * our srtt estimate is probably bogus. Clobber it
- * so we'll take the next rtt measurement as our srtt;
+ * If we backed off this far, our srtt estimate is probably bogus.
+ * Clobber it so we'll take the next rtt measurement as our srtt;
* move the current srtt into rttvar to keep the current
* retransmit times until then.
*/
@@ -564,7 +562,6 @@ tcp_timer_rexmt(xtp)
in6_losing(tp->t_inpcb);
else
#endif
- in_losing(tp->t_inpcb);
tp->t_rttvar += (tp->t_srtt >> TCP_RTT_SHIFT);
tp->t_srtt = 0;
}
OpenPOWER on IntegriCloud