From owner-freebsd-net@FreeBSD.ORG Sun Jul 15 15:47:42 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6BC0E106564A for ; Sun, 15 Jul 2012 15:47:42 +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 4B92F8FC0C for ; Sun, 15 Jul 2012 15:47:42 +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 q6FFlYr9007341; Sun, 15 Jul 2012 08:47:34 -0700 (PDT) Received: from [10.11.2.90] (unknown [12.153.182.2]) by ssl-tls.localdomain (Postfix) with ESMTP id 31982D0D6CD; Sun, 15 Jul 2012 08:47:34 -0700 (PDT) Message-ID: <5002E616.8050202@myri.com> Date: Sun, 15 Jul 2012 08:47:34 -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> 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: Sun, 15 Jul 2012 15:47:42 -0000 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