kern/75122: [PATCH] Incorrect inflight bandwidth calculation on first packet

Dan Nelson dnelson at allantgroup.com
Sun Jul 3 01:14:38 GMT 2005


The following reply was made to PR kern/75122; it has been noted by GNATS.

From: Dan Nelson <dnelson at allantgroup.com>
To: Uwe Doering <gemini at geminix.org>
Cc: freebsd-bugs at 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 at allantgroup.com
 _______________________________________________
 freebsd-bugs at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe at freebsd.org"
 


More information about the freebsd-bugs mailing list