Date: Wed, 22 Dec 2004 22:30:31 GMT From: Dan Nelson <dnelson@allantgroup.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/75122: [PATCH] Incorrect inflight bandwidth calculation on first packet Message-ID: <200412222230.iBMMUVHB036573@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/75122; it has been noted by GNATS. From: Dan Nelson <dnelson@allantgroup.com> To: Uwe Doering <gemini@geminix.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412222230.iBMMUVHB036573>