summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_var.h
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_var.h
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_var.h')
-rw-r--r--sys/netinet/tcp_var.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 0770412..5752da9 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -84,11 +84,7 @@ struct tcpcb {
int t_segqlen; /* segment reassembly queue length */
int t_dupacks; /* consecutive dup acks recd */
- struct callout *tt_rexmt; /* retransmit timer */
- struct callout *tt_persist; /* retransmit persistence */
- struct callout *tt_keep; /* keepalive */
- struct callout *tt_2msl; /* 2*msl TIME_WAIT timer */
- struct callout *tt_delack; /* delayed ACK timer */
+ struct tcp_timer *t_timers; /* retransmit timer */
struct inpcb *t_inpcb; /* back pointer to internet pcb */
int t_state; /* state of this connection */
@@ -538,8 +534,8 @@ void tcp_slowtimo(void);
struct tcptemp *
tcpip_maketemplate(struct inpcb *);
void tcpip_fillheaders(struct inpcb *, void *, void *);
-struct tcpcb *
- tcp_timers(struct tcpcb *, int);
+void tcp_timer_activate(struct tcpcb *, int, u_int);
+int tcp_timer_active(struct tcpcb *, int);
void tcp_trace(int, int, struct tcpcb *, void *, struct tcphdr *, int);
void tcp_xmit_bandwidth_limit(struct tcpcb *tp, tcp_seq ack_seq);
void syncache_init(void);
OpenPOWER on IntegriCloud