Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2012 20:16:15 -0700
From:      Reese Faucette <reese@myri.com>
To:        Sepherosa Ziehau <sepherosa@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: question in tcp_do_segment()
Message-ID:  <5003877F.6070309@myri.com>
In-Reply-To: <CAMOc5czkZQsW9cYhYe8yDavXr-4YGhvGcBCdmazLCcUw4j3B-Q@mail.gmail.com>
References:  <4FFF9E48.6000403@myri.com> <500060DB.3090407@myri.com> <CAMOc5cyCQ=be8%2B2fRM=wMyRhwyw2_OMoCSTL5cWNfM58vFWFGQ@mail.gmail.com> <5002E616.8050202@myri.com> <CAMOc5czkZQsW9cYhYe8yDavXr-4YGhvGcBCdmazLCcUw4j3B-Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5003877F.6070309>