diff options
author | Mike Silbersack <silby@FreeBSD.org> | 2007-09-24 05:26:24 +0000 |
---|---|---|
committer | Mike Silbersack <silby@FreeBSD.org> | 2007-09-24 05:26:24 +0000 |
commit | e2f2059f68d00d61b37710af70f4b23c1018a13c (patch) | |
tree | 8813a8872672cef81ebde1a54cef904ff70105d0 /sys/netinet/tcp_subr.c | |
parent | e270652ba313c5212b749f9537ab0d01b2c6f17a (diff) | |
download | src-e2f2059f68d00d61b37710af70f4b23c1018a13c.tar.gz src-e2f2059f68d00d61b37710af70f4b23c1018a13c.zip |
Two changes:
- Reintegrate the ANSI C function declaration change
from tcp_timer.c rev 1.92
- Reorganize the tcpcb structure so that it has a single
pointer to the "tcp_timer" structure which contains all
of the tcp timer callouts. This change means that when
the single tcp timer change is reintegrated, tcpcb will
not change in size, and therefore the ABI between
netstat and the kernel will not change.
Neither of these changes should have any functional
impact.
Reviewed by: bmah, rrs
Approved by: re (bmah)
Notes
Notes:
svn path=/head/; revision=172309
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index d9073807a995..0dde16221927 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -214,8 +214,7 @@ static void tcp_isn_tick(void *); */ struct tcpcb_mem { struct tcpcb tcb; - struct callout tcpcb_mem_rexmt, tcpcb_mem_persist, tcpcb_mem_keep; - struct callout tcpcb_mem_2msl, tcpcb_mem_delack; + struct tcp_timer tt; }; static uma_zone_t tcpcb_zone; @@ -590,6 +589,7 @@ tcp_newtcpcb(struct inpcb *inp) if (tm == NULL) return (NULL); tp = &tm->tcb; + tp->t_timers = &tm->tt; /* LIST_INIT(&tp->t_segq); */ /* XXX covered by M_ZERO */ tp->t_maxseg = tp->t_maxopd = #ifdef INET6 @@ -598,11 +598,11 @@ tcp_newtcpcb(struct inpcb *inp) tcp_mssdflt; /* Set up our timeouts. */ - callout_init(tp->tt_rexmt = &tm->tcpcb_mem_rexmt, CALLOUT_MPSAFE); - callout_init(tp->tt_persist = &tm->tcpcb_mem_persist, CALLOUT_MPSAFE); - callout_init(tp->tt_keep = &tm->tcpcb_mem_keep, CALLOUT_MPSAFE); - callout_init(tp->tt_2msl = &tm->tcpcb_mem_2msl, CALLOUT_MPSAFE); - callout_init(tp->tt_delack = &tm->tcpcb_mem_delack, CALLOUT_MPSAFE); + callout_init(&tp->t_timers->tt_rexmt, CALLOUT_MPSAFE); + callout_init(&tp->t_timers->tt_persist, CALLOUT_MPSAFE); + callout_init(&tp->t_timers->tt_keep, CALLOUT_MPSAFE); + callout_init(&tp->t_timers->tt_2msl, CALLOUT_MPSAFE); + callout_init(&tp->t_timers->tt_delack, CALLOUT_MPSAFE); if (tcp_do_rfc1323) tp->t_flags = (TF_REQ_SCALE|TF_REQ_TSTMP); @@ -675,11 +675,11 @@ tcp_discardcb(struct tcpcb *tp) * Make sure that all of our timers are stopped before we * delete the PCB. */ - callout_stop(tp->tt_rexmt); - callout_stop(tp->tt_persist); - callout_stop(tp->tt_keep); - callout_stop(tp->tt_2msl); - callout_stop(tp->tt_delack); + callout_stop(&tp->t_timers->tt_rexmt); + callout_stop(&tp->t_timers->tt_persist); + callout_stop(&tp->t_timers->tt_keep); + callout_stop(&tp->t_timers->tt_2msl); + callout_stop(&tp->t_timers->tt_delack); /* * If we got enough samples through the srtt filter, |