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

Issue 359653003: Simplify the QuicDispatcher::OnCanWrite logic (Closed)

Created:
6 years, 6 months ago by ramant (doing other things)
Modified:
6 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, wtc
Project:
chromium
Visibility:
Public.

Description

Simplify the QuicDispatcher::OnCanWrite logic Before a refactoring, connections used to be able to add themselves to QuicDispatcher::write_blocked_list_ even when they weren't write-blocked, making it necessary to give each connection only one attempt to write. However, this is no longer the case. Thus, the QuicDispatcher::OnCanWrite can now simply keep going until either no work is left or a connection gets write-blocked, and it's guaranteed that no connection will come up twice (since if it gets added back to write_blocked_list_, it is now blocked and the loop terminates). I've added a longer explanatory comment and inserted a stronger check to make sure the condition holds. Simplify QuicDispatcher::OnCanWrite logic Most of the changes were already in net/quic/quic_dispatcher.*. Merged missing changes. Merge internal change: 70043318 R=rch@chromium.org

Patch Set 1 #

Total comments: 10

Patch Set 2 : Fixed wtc's comments in Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -30 lines) Patch
M net/quic/quic_dispatcher.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M net/quic/quic_dispatcher.cc View 1 2 chunks +12 lines, -5 lines 0 comments Download
M net/quic/quic_server_session.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/tools/quic/quic_dispatcher.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M net/tools/quic/quic_dispatcher.cc View 1 2 chunks +13 lines, -14 lines 0 comments Download
M net/tools/quic/quic_dispatcher_test.cc View 2 chunks +1 line, -2 lines 0 comments Download
M net/tools/quic/quic_server_session.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/tools/quic/test_tools/quic_dispatcher_peer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/tools/quic/test_tools/quic_dispatcher_peer.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M net/tools/quic/test_tools/quic_test_utils.h View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
ramant (doing other things)
6 years, 6 months ago (2014-06-26 22:07:55 UTC) #1
Ryan Hamilton
lgtm
6 years, 5 months ago (2014-06-27 14:28:39 UTC) #2
wtc
Patch set 1 LGTM. I suggest some small changes. https://codereview.chromium.org/359653003/diff/1/net/tools/quic/quic_dispatcher.cc File net/tools/quic/quic_dispatcher.cc (right): https://codereview.chromium.org/359653003/diff/1/net/tools/quic/quic_dispatcher.cc#newcode351 net/tools/quic/quic_dispatcher.cc:351: ...
6 years, 5 months ago (2014-06-27 17:08:01 UTC) #3
dmziegler
https://codereview.chromium.org/359653003/diff/1/net/tools/quic/quic_dispatcher.h File net/tools/quic/quic_dispatcher.h (right): https://codereview.chromium.org/359653003/diff/1/net/tools/quic/quic_dispatcher.h#newcode100 net/tools/quic/quic_dispatcher.h:100: virtual void OnWriteBlocked(QuicBlockedWriterInterface* blocked) OVERRIDE; On 2014/06/27 17:08:01, wtc ...
6 years, 5 months ago (2014-06-27 17:26:42 UTC) #4
ramant (doing other things)
PTAL. https://codereview.chromium.org/359653003/diff/1/net/tools/quic/quic_dispatcher.cc File net/tools/quic/quic_dispatcher.cc (right): https://codereview.chromium.org/359653003/diff/1/net/tools/quic/quic_dispatcher.cc#newcode351 net/tools/quic/quic_dispatcher.cc:351: // Return without adding the session to the ...
6 years, 5 months ago (2014-06-27 19:18:40 UTC) #5
wtc
6 years, 5 months ago (2014-06-30 23:48:05 UTC) #6
Message was sent while issue was closed.
Patch set 2 LGTM. Thanks!

Powered by Google App Engine
This is Rietveld 408576698