question in tcp_do_segment()
Reese Faucette
reese at myri.com
Mon Jul 16 03:16:15 UTC 2012
On 7/15/2012 6:53 PM, Sepherosa Ziehau wrote:
>> On 7/15/2012 3:26 AM, Sepherosa Ziehau wrote:
> Hmm, callout_active() is not used to check for whether the callout is
> fired or not; it is used to check whether callout_reset() has been
> called but callout_stop() is not yet been called. IMO,
> callout_reset() is "set" the callout, callout_stop() is "unset" the
> callout.
OK, sorry, I was going by the callout implementation in 8.0 - I compared
sources and the tcp_input code was roughly the same, tcp_timer_*() was
roughly the same, but since all that was the same, I did not dig all the
way to the bottom of callout_reset() implementation, and I see that the
semantics of callout_active() have changed to be as you describe. My
callout_active() from 8.0 is:
#define callout_active(c) ((c)->c_flags & CALLOUT_FIRED)
hence, my lame claims about the behavior.
Sorry for the noise...
-reese
More information about the freebsd-net
mailing list