HomeFreeBSD

CC Cubic: fix underflow for cubic_cwnd()

Description

CC Cubic: fix underflow for cubic_cwnd()

Singed calculations in cubic_cwnd() can result in negative cwnd
value which is then cast to an unsigned value. Values less than
1 mss are generally bad for other parts of the code, also fixed.

Submitted by: Jason Eggleston <jason@eggnet.com>
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D14141

Details

Provenance
sbrunoAuthored on
Differential Revision
D14141: fix underflow for cubic_cwnd()
Parents
rS331566: vmci(4): Fix GCC build and rationalize vmci_kernel_defs.h
Branches
Unknown
Tags
Unknown

Event Timeline

rscheff added inline comments.
/head/sys/netinet/cc/cc_cubic.h
179

This doesn't look right.

x^3 * C * mss != (x*C*mss)^3 if I'm not mistaken...