Land Recent QUIC Changes.
commit51cc134b9061bb13b3a4af42f256a9b16b15f2e3
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 18 Apr 2014 23:44:37 +0000 (18 23:44 +0000)
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 18 Apr 2014 23:44:37 +0000 (18 23:44 +0000)
treef06eebafd935263f1cfd1c8f9003b093169ec458
parente6a9ca2eef73df9fefc2b79845d908af1a5aa7f2
Land Recent QUIC Changes.

Disable QuicFlowController for QUIC versions < QUIC_VERSION_17

Chrome Beta was happily advertising a flow control receive window of
length 0, under the assumption that because the version of QUIC being
spoken didn't support flow control, a zero length window advertisement
would have no adverse effects.

On the server end, the refactoring in internal change: 64733866 resulted
in the QUIC version not being checked when querying
QuicFlowController::IsBlocked. IsBlocked would look at the client's
advertised receive window, and conclude that no data could be sent. This
would never change as the flow control accounting is protected behind
version checks.

Ultimately this means that once a stream was marked as write blocked, it
would never resume writing:

https://codereview.chromium.org/242453002/diff/1/net/quic/quic_session.cc?context=&column_width=80
(line# 286) resulting in a connection timeout.

This CL explicitly disables the QuicFlowController when the negotiated
QUIC version is < QUIC_VERSION_17.

Merge internal change: 65137349

This internal change was LGTM'ed by rch. Wanted to port this change
to disable flow control.

https://codereview.chromium.org/242583002/

Downgrading rst stream codes which wouldn't be recognized by the peer.

chromium: fixed chromium's unit tests to use AdjustErrorForVersion.

Merge internal change: 64783797
https://codereview.chromium.org/242483002/

Added WriteResult::WriteResult method for internal use.

Merge internal change: 64780998
https://codereview.chromium.org/242293003/

QUIC: When sending a RST stream for flow control accounting purposes,
include a more descriptive error code.

Prompted by alyssar's comment in internal change: 61236803

Chromium specific code:
+ deleted unused ConstructRstPacket method from
QuicNetworkTransactionTest.
+ Changed ConstructRstPacket to use the new descriptive error code.

Merge internal change: 64774941
https://codereview.chromium.org/242093003/

Pull out flow control functionality from ReliableQuicStream into a new
class, QuicFlowController.

Without this refactoring, all the accounting of bytes
sent/buffered/consumed, comparisons of these with limits to decide if
blocked or not, will be duplicated in ReliableQuicStream and
QuicConnection. Putting all this in a new class means it's easier to
have more comprehensive testing, simplifies ReliableQuicStream, and will
make it much easier to add Connection level flow control (work in
progress internal change: 63944402).

Refactor of QUIC stream flow control. No behavior change, still
protected behind FLAGS_enable_quic_stream_flow_control. This flag is
currently disabled.

Merge internal change: 64733866
https://codereview.chromium.org/242453002/

Plumbs through delta_largest_observed from
QuicSentPackerManager::HandleAckForSentPacket, up to the
QuicAckNotifier. Eventually these values get to the
QuicFasterStatsGatherer which now performs a more accurate RT
calculation.

The important changes are in QuicSentPacketManager (pulling the delta
out of ReceivedInfo), and in QuicFasterStatsGatherer (doing the new
calculation of RT). The rest is plumbing and updating tests.

Improve accuracy of QUIC FasterStats RT calculation by using the
delta time included with delayed ACKs.

Merge internal change: 64721749
https://codereview.chromium.org/241783002/

Fixed a bug in QuicPacketCreator when FEC was used for unsupported
versions, and made packet_creator tests run across all supported
versions of QUIC.

Merge internal change: 64701677
https://codereview.chromium.org/241483004/

Fix to ensure hybrid slow start is reset when QUIC's retransmission
timer fires.

Merge internal change: 64698621
https://codereview.chromium.org/241563002/

R=rch@chromium.org

Review URL: https://codereview.chromium.org/242593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264889 0039d316-1c4b-4281-b951-d872f2087c98
51 files changed:
net/net.gypi
net/quic/congestion_control/hybrid_slow_start.cc
net/quic/congestion_control/hybrid_slow_start.h
net/quic/congestion_control/hybrid_slow_start_test.cc
net/quic/congestion_control/tcp_cubic_sender.cc
net/quic/congestion_control/tcp_cubic_sender_test.cc
net/quic/quic_ack_notifier.cc
net/quic/quic_ack_notifier.h
net/quic/quic_ack_notifier_manager.cc
net/quic/quic_ack_notifier_manager.h
net/quic/quic_ack_notifier_test.cc
net/quic/quic_connection.cc
net/quic/quic_connection_test.cc
net/quic/quic_crypto_stream.cc
net/quic/quic_crypto_stream.h
net/quic/quic_crypto_stream_test.cc
net/quic/quic_data_stream.cc
net/quic/quic_data_stream.h
net/quic/quic_data_stream_test.cc
net/quic/quic_flow_controller.cc [new file with mode: 0644]
net/quic/quic_flow_controller.h [new file with mode: 0644]
net/quic/quic_flow_controller_test.cc [new file with mode: 0644]
net/quic/quic_headers_stream.cc
net/quic/quic_headers_stream.h
net/quic/quic_headers_stream_test.cc
net/quic/quic_http_stream_test.cc
net/quic/quic_network_transaction_unittest.cc
net/quic/quic_packet_creator.cc
net/quic/quic_packet_creator.h
net/quic/quic_packet_creator_test.cc
net/quic/quic_packet_generator.cc
net/quic/quic_protocol.cc
net/quic/quic_protocol.h
net/quic/quic_protocol_test.cc
net/quic/quic_sent_packet_manager.cc
net/quic/quic_sent_packet_manager.h
net/quic/quic_session.cc
net/quic/quic_session_test.cc
net/quic/quic_stream_factory_test.cc
net/quic/quic_stream_sequencer.cc
net/quic/quic_utils.cc
net/quic/reliable_quic_stream.cc
net/quic/reliable_quic_stream.h
net/quic/reliable_quic_stream_test.cc
net/quic/test_tools/quic_flow_controller_peer.cc [new file with mode: 0644]
net/quic/test_tools/quic_flow_controller_peer.h [new file with mode: 0644]
net/quic/test_tools/quic_test_utils.h
net/quic/test_tools/reliable_quic_stream_peer.cc
net/quic/test_tools/reliable_quic_stream_peer.h
net/tools/quic/quic_server_session_test.cc
net/tools/quic/test_tools/quic_test_utils.h