Restore the semantic of callout_active() testing on tcp timers.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 15 Dec 2008 14:29:35 +0000 (22:29 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 16 Dec 2008 14:32:59 +0000 (22:32 +0800)
commita48c5dd5268dc3f67165670e4e4e550f6fa6816a
tree0aeab3907de924aa0c96235770533d525e017b54
parentddbd4fa768905c84f5a47ce4b0f89a9d66c0df27
Restore the semantic of callout_active() testing on tcp timers.

Originally there is no time gap between the running of the tcp timer
handler and the deactivation of the tcp timer callout, but the message
based tcp timer has a time gap in between these two actions.  This
time gap affects the code path which depends on the current state of
the tcp timer, i.e. return value of callout_active(tcp_timer).  To
close this time gap, we take the pending and running tcp timer tasks
into consideration when testing the current state of the tcp timer.

Reviewed-by: dillon@
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_syncache.c
sys/netinet/tcp_timer.c
sys/netinet/tcp_timer.h
sys/netinet/tcp_timer2.h [new file with mode: 0644]
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h