From owner-freebsd-net@FreeBSD.ORG Mon Jul 16 03:16:15 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 908631065696 for ; Mon, 16 Jul 2012 03:16:15 +0000 (UTC) (envelope-from reese@myri.com) Received: from myri.com (rrcs-24-43-81-194.west.biz.rr.com [24.43.81.194]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9D88FC17 for ; Mon, 16 Jul 2012 03:16:15 +0000 (UTC) Received: from ssl-tls.localdomain (ssl-tls.myri-local.com [172.31.0.162]) by myri.com (8.13.7+Sun/8.13.7) with ESMTP id q6G3GEQe025839; Sun, 15 Jul 2012 20:16:14 -0700 (PDT) Received: from [172.31.135.209] (reese-ovpn.sw.myri.com [172.31.135.209]) by ssl-tls.localdomain (Postfix) with ESMTP id 70FA6D0D6CD; Sun, 15 Jul 2012 20:16:14 -0700 (PDT) Message-ID: <5003877F.6070309@myri.com> Date: Sun, 15 Jul 2012 20:16:15 -0700 From: Reese Faucette User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Sepherosa Ziehau References: <4FFF9E48.6000403@myri.com> <500060DB.3090407@myri.com> <5002E616.8050202@myri.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: question in tcp_do_segment() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2012 03:16:15 -0000 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