From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 22 22:30:32 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5485116A4CE for ; Wed, 22 Dec 2004 22:30:32 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F7BD43D2D for ; Wed, 22 Dec 2004 22:30:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBMMUVo5036576 for ; Wed, 22 Dec 2004 22:30:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBMMUVHB036573; Wed, 22 Dec 2004 22:30:31 GMT (envelope-from gnats) Date: Wed, 22 Dec 2004 22:30:31 GMT Message-Id: <200412222230.iBMMUVHB036573@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Dan Nelson Subject: Re: kern/75122: [PATCH] Incorrect inflight bandwidth calculation on first packet X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Dan Nelson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Dec 2004 22:30:32 -0000 The following reply was made to PR kern/75122; it has been noted by GNATS. From: Dan Nelson To: Uwe Doering Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org Subject: Re: kern/75122: [PATCH] Incorrect inflight bandwidth calculation on first packet Date: Wed, 22 Dec 2004 16:24:52 -0600 In the last episode (Dec 21), Uwe Doering said: > Uwe Doering wrote: > >Dan Nelson wrote: > >>In the last episode (Dec 18), Uwe Doering said: > >>>Dan Nelson wrote: > >>> > >>>>Updated patch including Matt's recommended fix: > >>>> > >>>>+ /* > >>>>+ * Sanity check, plus ignore pure window update acks. > >>>>+ */ > >>>>+ if ((int)(ack_seq - tp->t_bw_rtseq) <= 0) > >>>>+ return; > > On second thought, checking for less than zero (by means of the 'int' > cast) might have its merits. This may be a protection against > out-of-order ACKs, which could in fact be valid, but calculating a byte > count from an ACK for an earlier packet when we've already processed a > later ACK would be bogus. I am pretty sure only useful acks get to this point. I've changed that bit of code to just be + /* + * Ignore pure window update acks. + */ + if (ack_seq == tp->t_bw_rtseq) + return; and added another check for negative sequences that increments a sysctl counter. So far netstat -s has counted 567 out-of-order packets but my counter is still at 0. -- Dan Nelson dnelson@allantgroup.com