Chromium Code Reviews
DescriptionFixed integer signing bug in cubic bytes/packet implementation
Problem: There was a bug in cubic implementation where we were cubing
a negative number (the offset), casting it to an unsigned int, and
then unconditionally subtracting the result from a small positive
number.
There are many possible ways to fix the bug. I decided to choose the
fix that was as parallel is possible to the kernel code.
Due to the saving grace of unsigned modulo arithmetic, the primary
effect of this bug was simply an off-by-one error. (We were always
one greater than we should have been).
Fixed the bug, flag-protected the fix, and created a connection option
for enabling the fix in an experiment.
I have also tightened up the tests, which previously made liberal use
of EXPECT_NEAR. Now it is clear exactly when we expect reno-mode,
cubic-mode, and "conservative increase" mode.
I've also tried to remove as many magic constants as I could from
these tests. For example, there's no explanation of why the
"AboveOrigin" tests do exactly 48 iterations of reno-increases before
switching to cubic convex-increases. Now the number of iterations is
derived from a formula in the code.
Merge internal change: 139804227
BUG=
Patch Set 1 #
Total comments: 3
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 4 (1 generated)
|