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

Issue 107803002: Consistently suggest ephemeral port for QUIC client (Closed)

Created:
7 years ago by jar (doing other things)
Modified:
7 years ago
Reviewers:
wtc, Ryan Hamilton
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Create and use a seeded random number generator (PortSuggester) to suggest what ephemeral source port should be used when opening a UDP client socket in QUIC. This should increase the likelihood of 0-RTT connections, even if a strike server is not used across a server cluster. BUG=326545 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=239426 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240782

Patch Set 1 #

Patch Set 2 : Add consistency test, and fix unsigned-signed compares #

Patch Set 3 : More linty fixes. #

Patch Set 4 : more lint #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 22

Patch Set 7 : Repond to wtc review #

Total comments: 51

Patch Set 8 : Respond to comments by rch and wtc #

Patch Set 9 : Added histograms.xml description and a comment #

Patch Set 10 : Switch to a smaller seed to avoid using unions #

Patch Set 11 : Move a paren... save a 64 bit add #

Total comments: 19

Patch Set 12 : Respond to comments by rch #

Total comments: 2

Patch Set 13 : Removed a now-extraneous cast #

Patch Set 14 : Fix DCHECK typo, an update Mocks to be compatible #

Total comments: 2

Patch Set 15 : Pulled together duplicate code in socket_test_util.cc #

Total comments: 4

Patch Set 16 : Disable new assertions in quic_factory_stream.cc #

Total comments: 4

Patch Set 17 : Removed DCHECK and associated code to avoid delaying feature landing #

Patch Set 18 : Rebase to TOT, including all connect() error handling #

Patch Set 19 : Rebase to TOT #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -2 lines) Patch
M net/net.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -0 lines 0 comments Download
A net/quic/port_suggester.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +50 lines, -0 lines 0 comments Download
A net/quic/port_suggester.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +49 lines, -0 lines 0 comments Download
A net/quic/port_suggester_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +112 lines, -0 lines 0 comments Download
M net/quic/quic_stream_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +8 lines, -0 lines 1 comment Download
M net/quic/quic_stream_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +10 lines, -2 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
jar (doing other things)
7 years ago (2013-12-06 19:28:48 UTC) #1
wtc
Patch set 6 LGTM. Please fix the unaligned access of uint64 and int. https://codereview.chromium.org/107803002/diff/60002/net/quic/port_suggester.cc File ...
7 years ago (2013-12-06 23:36:43 UTC) #2
jar (doing other things)
https://chromiumcodereview.appspot.com/107803002/diff/60002/net/quic/port_suggester.cc File net/quic/port_suggester.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/60002/net/quic/port_suggester.cc#newcode18 net/quic/port_suggester.cc:18: uint64* start_of_seed = reinterpret_cast<uint64*>(seed_); On 2013/12/06 23:36:44, wtc wrote: ...
7 years ago (2013-12-07 00:47:58 UTC) #3
wtc
Patch set 7 LGTM. https://chromiumcodereview.appspot.com/107803002/diff/100001/net/quic/port_suggester.cc File net/quic/port_suggester.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/100001/net/quic/port_suggester.cc#newcode28 net/quic/port_suggester.cc:28: // Sometimes our suggestion can't ...
7 years ago (2013-12-07 01:03:37 UTC) #4
Ryan Hamilton
Thanks for doing this! It'll be great to see the impact on 0-RTT, before we ...
7 years ago (2013-12-07 01:46:13 UTC) #5
jar (doing other things)
https://codereview.chromium.org/107803002/diff/100001/net/quic/port_suggester.cc File net/quic/port_suggester.cc (right): https://codereview.chromium.org/107803002/diff/100001/net/quic/port_suggester.cc#newcode19 net/quic/port_suggester.cc:19: DCHECK_LE(sizeof(seed_.first_uint64), sizeof(seed_.hash_bytes)); On 2013/12/07 01:46:14, Ryan Hamilton wrote: > ...
7 years ago (2013-12-07 03:12:17 UTC) #6
Ryan Hamilton
https://codereview.chromium.org/107803002/diff/100001/net/quic/port_suggester.cc File net/quic/port_suggester.cc (right): https://codereview.chromium.org/107803002/diff/100001/net/quic/port_suggester.cc#newcode20 net/quic/port_suggester.cc:20: seed_.first_uint64 ^= per_profile_randomness ^ server.port(); On 2013/12/07 03:12:18, jar ...
7 years ago (2013-12-07 04:52:22 UTC) #7
jar (doing other things)
Ryan: Per your request, I switched to using uint64 as a seed_. You can compare ...
7 years ago (2013-12-07 21:09:28 UTC) #8
Ryan Hamilton
Thanks! Looks much more readable to me. https://chromiumcodereview.appspot.com/107803002/diff/100001/net/quic/port_suggester.cc File net/quic/port_suggester.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/100001/net/quic/port_suggester.cc#newcode19 net/quic/port_suggester.cc:19: DCHECK_LE(sizeof(seed_.first_uint64), sizeof(seed_.hash_bytes)); ...
7 years ago (2013-12-07 23:21:54 UTC) #9
jar (doing other things)
https://chromiumcodereview.appspot.com/107803002/diff/100001/net/quic/port_suggester.cc File net/quic/port_suggester.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/100001/net/quic/port_suggester.cc#newcode19 net/quic/port_suggester.cc:19: DCHECK_LE(sizeof(seed_.first_uint64), sizeof(seed_.hash_bytes)); On 2013/12/07 23:21:54, Ryan Hamilton wrote: > ...
7 years ago (2013-12-08 01:38:36 UTC) #10
Ryan Hamilton
Looking good. Down to one nit, and some questions about the DCHECK in the QuicStreamFactory. ...
7 years ago (2013-12-08 04:00:29 UTC) #11
jar (doing other things)
https://chromiumcodereview.appspot.com/107803002/diff/160002/net/quic/quic_stream_factory.cc File net/quic/quic_stream_factory.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/160002/net/quic/quic_stream_factory.cc#newcode464 net/quic/quic_stream_factory.cc:464: address.port() == port_suggester->previous_suggestion()); On 2013/12/08 04:00:29, Ryan Hamilton wrote: ...
7 years ago (2013-12-08 04:57:42 UTC) #12
Ryan Hamilton
https://chromiumcodereview.appspot.com/107803002/diff/160002/net/quic/quic_stream_factory.cc File net/quic/quic_stream_factory.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/160002/net/quic/quic_stream_factory.cc#newcode464 net/quic/quic_stream_factory.cc:464: address.port() == port_suggester->previous_suggestion()); On 2013/12/08 04:57:43, jar wrote: > ...
7 years ago (2013-12-08 05:24:08 UTC) #13
Ryan Hamilton
https://chromiumcodereview.appspot.com/107803002/diff/160002/net/quic/quic_stream_factory.cc File net/quic/quic_stream_factory.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/160002/net/quic/quic_stream_factory.cc#newcode464 net/quic/quic_stream_factory.cc:464: address.port() == port_suggester->previous_suggestion()); On 2013/12/08 05:24:08, Ryan Hamilton wrote: ...
7 years ago (2013-12-08 06:06:22 UTC) #14
jar (doing other things)
I made two changes in quic_test_util.cc to allow the DCHECK in quic_factory_stream_test.cc to work. Ryan: ...
7 years ago (2013-12-08 21:12:57 UTC) #15
jar (doing other things)
It looks like the tests I fixed on Window to deal with the assertion (I'm ...
7 years ago (2013-12-08 22:18:04 UTC) #16
Ryan Hamilton
I'm completely happy with port_suggester*{h,cc}. Woo hoo! Thanks for the fixes. I recommend a different ...
7 years ago (2013-12-08 22:54:14 UTC) #17
Ryan Hamilton
On 2013/12/08 22:18:04, jar wrote: > It looks like the tests I fixed on Window ...
7 years ago (2013-12-08 22:56:59 UTC) #18
Ryan Hamilton
LGTM after two small fixes. https://chromiumcodereview.appspot.com/107803002/diff/260001/net/quic/quic_stream_factory.cc File net/quic/quic_stream_factory.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/260001/net/quic/quic_stream_factory.cc#newcode479 net/quic/quic_stream_factory.cc:479: #endif // 0 Please ...
7 years ago (2013-12-08 23:22:20 UTC) #19
jar (doing other things)
https://chromiumcodereview.appspot.com/107803002/diff/260001/net/quic/quic_stream_factory.cc File net/quic/quic_stream_factory.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/260001/net/quic/quic_stream_factory.cc#newcode479 net/quic/quic_stream_factory.cc:479: #endif // 0 On 2013/12/08 23:22:21, Ryan Hamilton wrote: ...
7 years ago (2013-12-08 23:30:45 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jar@chromium.org/107803002/280001
7 years ago (2013-12-08 23:31:01 UTC) #21
commit-bot: I haz the power
Change committed as 239426
7 years ago (2013-12-09 02:25:47 UTC) #22
Ryan Hamilton
https://chromiumcodereview.appspot.com/107803002/diff/240001/net/socket/socket_test_util.cc File net/socket/socket_test_util.cc (right): https://chromiumcodereview.appspot.com/107803002/diff/240001/net/socket/socket_test_util.cc#newcode675 net/socket/socket_test_util.cc:675: ExerciseSocketRandomNumberGenerator(rand_int_cb); On 2013/12/08 22:54:15, Ryan Hamilton wrote: > Instead ...
7 years ago (2013-12-09 04:15:50 UTC) #23
jar (doing other things)
This is a reland of the port_suggester code, atop the fixes landed yesterday.
7 years ago (2013-12-13 20:01:59 UTC) #24
Ryan Hamilton
LGTM Please add a unit test to quic_stream_factory which makes 2 sessions to host A ...
7 years ago (2013-12-13 20:13:08 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jar@chromium.org/107803002/310001
7 years ago (2013-12-13 20:19:44 UTC) #26
wtc
Patch set 19 LGTM. https://chromiumcodereview.appspot.com/107803002/diff/310001/net/quic/quic_stream_factory.h File net/quic/quic_stream_factory.h (right): https://chromiumcodereview.appspot.com/107803002/diff/310001/net/quic/quic_stream_factory.h#newcode239 net/quic/quic_stream_factory.h:239: uint64 port_entropy_; Nit: maybe this ...
7 years ago (2013-12-13 22:06:23 UTC) #27
commit-bot: I haz the power
7 years ago (2013-12-13 22:47:13 UTC) #28
Message was sent while issue was closed.
Change committed as 240782

Powered by Google App Engine
This is Rietveld 408576698