Date: Thu, 3 May 2018 15:38:13 -0400 From: "Jonathan T. Looney" <jtl@freebsd.org> To: Sean Bruno <sbruno@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r333211 - head/sys/netinet/cc Message-ID: <CADrOrmu4jhKqK8TiFdxYsfozEvCdBdv5Fqb__U=aH0oAV7k52g@mail.gmail.com> In-Reply-To: <201805031501.w43F1Reo024234@repo.freebsd.org> References: <201805031501.w43F1Reo024234@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 3, 2018 at 11:01 AM, Sean Bruno <sbruno@freebsd.org> wrote: > > @@ -242,8 +241,8 @@ tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned > { > > /* Equation 4 of I-D. */ > - return (((wmax * CUBIC_BETA) + (((THREE_X_PT2 * ticks_since_cong * > - smss) << CUBIC_SHIFT) / TWO_SUB_PT2 / rtt_ticks)) >> CUBIC_SHIFT); > + return (((wmax * CUBIC_BETA) + (((THREE_X_PT3 * ticks_since_cong * > + smss) << CUBIC_SHIFT) / TWO_SUB_PT3 / rtt_ticks)) >> CUBIC_SHIFT); > } > > #endif /* _NETINET_CC_CUBIC_H_ */ > Did you analyze this to ensure that the intermediate steps in this calculation would never overflow? Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADrOrmu4jhKqK8TiFdxYsfozEvCdBdv5Fqb__U=aH0oAV7k52g>