Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Issue 2550453002: Fixed integer signing bug in cubic bytes/packet implementation (Closed)

Created:
4 years ago by Ryan Hamilton
Modified:
4 years ago
Reviewers:
Zhongyi Shi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed 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
Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -44 lines) Patch
M net/quic/core/congestion_control/cubic.h View 3 chunks +12 lines, -3 lines 1 comment Download
M net/quic/core/congestion_control/cubic.cc View 4 chunks +22 lines, -3 lines 0 comments Download
M net/quic/core/congestion_control/cubic_bytes.h View 2 chunks +6 lines, -0 lines 0 comments Download
M net/quic/core/congestion_control/cubic_bytes.cc View 3 chunks +25 lines, -4 lines 0 comments Download
M net/quic/core/congestion_control/cubic_bytes_test.cc View 3 chunks +161 lines, -14 lines 0 comments Download
M net/quic/core/congestion_control/cubic_test.cc View 2 chunks +58 lines, -20 lines 0 comments Download
M net/quic/core/congestion_control/tcp_cubic_sender_bytes.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M net/quic/core/congestion_control/tcp_cubic_sender_packets.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/quic/core/congestion_control/tcp_cubic_sender_packets.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M net/quic/core/crypto/crypto_protocol.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/quic/core/quic_flags_list.h View 1 chunk +4 lines, -0 lines 2 comments Download
M net/tools/quic/end_to_end_test.cc View 1 chunk +4 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 4 (1 generated)
Ryan Hamilton
4 years ago (2016-12-01 21:14:11 UTC) #2
Zhongyi Shi
lgtm Just make sure the default value of quic_fix_cubic_convex_mode is correct. https://codereview.chromium.org/2550453002/diff/1/net/quic/core/congestion_control/cubic.h File net/quic/core/congestion_control/cubic.h (right): ...
4 years ago (2016-12-01 22:15:23 UTC) #3
Zhongyi Shi
4 years ago (2016-12-01 22:47:51 UTC) #4
https://codereview.chromium.org/2550453002/diff/1/net/quic/core/quic_flags_li...
File net/quic/core/quic_flags_list.h (right):

https://codereview.chromium.org/2550453002/diff/1/net/quic/core/quic_flags_li...
net/quic/core/quic_flags_list.h:166: QUIC_FLAG(bool,
FLAGS_quic_fix_cubic_convex_mode, true)
On 2016/12/01 22:15:23, Zhongyi Shi wrote:
> Do we want to turn on this by default? We haven't turn on this internally.

Fine. Found it turned off in the flag flip cl.

Powered by Google App Engine
This is Rietveld 408576698