summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2007-04-11 09:45:16 +0000
committerandre <andre@FreeBSD.org>2007-04-11 09:45:16 +0000
commitbd6041301a0ba459f34d99a6e4e526ebaafc48b0 (patch)
treedb2065ed42263113dca9aaa7ad58c859f3975c57 /sys/netinet/tcp_syncache.c
parentbda6bd3e38175b52aef99a649001fdc4143dfb11 (diff)
downloadFreeBSD-src-bd6041301a0ba459f34d99a6e4e526ebaafc48b0.zip
FreeBSD-src-bd6041301a0ba459f34d99a6e4e526ebaafc48b0.tar.gz
Change the TCP timer system from using the callout system five times
directly to a merged model where only one callout, the next to fire, is registered. Instead of callout_reset(9) and callout_stop(9) the new function tcp_timer_activate() is used which then internally manages the callout. The single new callout is a mutex callout on inpcb simplifying the locking a bit. tcp_timer() is the called function which handles all race conditions in one place and then dispatches the individual timer functions. Reviewed by: rwatson (earlier version)
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 2a11710..128057b 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -730,7 +730,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m)
*/
if (sc->sc_rxmits > 1)
tp->snd_cwnd = tp->t_maxseg;
- callout_reset(tp->tt_keep, tcp_keepinit, tcp_timer_keep, tp);
+ tcp_timer_activate(tp, TT_KEEP, tcp_keepinit);
INP_UNLOCK(inp);
OpenPOWER on IntegriCloud