question in tcp_do_segment()

Reese Faucette reese at myri.com
Sun Jul 15 15:47:42 UTC 2012


On 7/15/2012 3:26 AM, Sepherosa Ziehau wrote:

> !tcp_timer_active() means that the connection's retransmit timer is
> not _set_ yet (please note, it is _not_ "has fired").  As far as I
> understand this code, it in turn means that this connection doesn't
> have any segments that were sent but not yet ACKed.

You'd think that was the case from the name, but tcp_timer_active() 
calls callout_active() which checks for fired.  If you want to check for 
"timer set" you need to use callout_pending().
-reese




More information about the freebsd-net mailing list