diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-31 20:36:04 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-31 20:36:04 +0000 |
commit | 9bb57c7152c7b430c2338c7f1c7a5404e421774f (patch) | |
tree | 2dc4141440e75fd0a82cd280add80d6418306909 /net/quic/quic_sent_packet_manager.cc | |
parent | 8bd5938206ed01f45172f423cd26889404800d3d (diff) | |
download | chromium_src-9bb57c7152c7b430c2338c7f1c7a5404e421774f.zip chromium_src-9bb57c7152c7b430c2338c7f1c7a5404e421774f.tar.gz chromium_src-9bb57c7152c7b430c2338c7f1c7a5404e421774f.tar.bz2 |
Land Recent QUIC Changes
Remove a LOG_IF(DFATAL) for retransmitting packets which were never
given a sent time.
This DCHECK was firing on Chrome when Windows buffered a packet and
before the callback for the packet being sent, Chrome received a server
reject and had to change crypto context and retransmit all unacked
packets.
Merge internal change: 63686840
https://codereview.chromium.org/214413009/
Rename of QUIC flow control member variables to be more explicit (prefix
flow_control) and more descriptive ("max" instead of "initial").
Merge internal change: 63599012
https://codereview.chromium.org/215423003/
Change comment in QuicSessionTest to be more accurate, and add another
expectation to ensure stream is not flow control blocked before sending
any data.
Merge internal change: 63604321
Fixed compilation warnings in quic_sent_packet_manager_test.cc.
https://codereview.chromium.org/214823010/
Added UseWriter changes to QuicTestClient while porting internal
code that handles the client side of unwinding UDP proxied QUIC changes.
Merge internal change: 63542972
https://codereview.chromium.org/214083003/
Change to QUIC's SendAlgorithmInterface to remove IsHandshake from
TimeUntilSend.
Changed QuicSentPacketManager to ensure it always retransmitted crypto
handshake packets before other retransmissions.
Merge internal change: 63540663
https://codereview.chromium.org/214923003/
Removing TransmissionType from QUIC's TimeUntilSend method.
The only real user was was TcpCubicSender for tail loss probe, and TLP
is better fully contained within the SentPacketManager.
Merge internal change: 63501475
https://codereview.chromium.org/214083002/
Removed unnecessary transmission_type from Quic's send algorithm
interface.
The few remaining uses were improper, so there is a minor change in
behavior.
Merge internal change: 63480011
https://codereview.chromium.org/211693004/
Introduce QUIC_VERSION_17: per-stream flow control. Default send window
is 16 KB, and the client/server can specify higher values in their
CHLO/SHLO messages. WINDOW_UPDATE frames are sent when the receiver has
consumed more than half of their receive window (behavior copied from
SPDY), and BLOCKED frames are sent if a write is attempted while flow
control blocked.
Protected behind FLAGS_enable_quic_stream_flow_control.
Merge internal change: 63474251
https://codereview.chromium.org/211743005/
Adding an accessor to quic dispatcher.
Merge internal change: 63470311
https://codereview.chromium.org/208273008/
R=rch@chromium.org
Review URL: https://codereview.chromium.org/215663002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_sent_packet_manager.cc')
-rw-r--r-- | net/quic/quic_sent_packet_manager.cc | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc index bd8efb1..56e5153 100644 --- a/net/quic/quic_sent_packet_manager.cc +++ b/net/quic/quic_sent_packet_manager.cc @@ -12,27 +12,13 @@ #include "net/quic/crypto/crypto_protocol.h" #include "net/quic/quic_ack_notifier_manager.h" #include "net/quic/quic_connection_stats.h" +#include "net/quic/quic_flags.h" #include "net/quic/quic_utils_chromium.h" using std::make_pair; using std::max; using std::min; -// TODO(rtenneti): Remove this. -// Do not flip this flag until the flakiness of the -// net/tools/quic/end_to_end_test is fixed. -// If true, then QUIC connections will track the retransmission history of a -// packet so that an ack of a previous transmission will ack the data of all -// other transmissions. -bool FLAGS_track_retransmission_history = false; - -// Do not remove this flag until the Finch-trials described in b/11706275 -// are complete. -// If true, QUIC connections will support the use of a pacing algorithm when -// sending packets, in an attempt to reduce packet loss. The client must also -// request pacing for the server to enable it. -bool FLAGS_enable_quic_pacing = true; - namespace net { namespace { static const int kDefaultRetransmissionTimeMs = 500; @@ -242,7 +228,6 @@ void QuicSentPacketManager::MarkForRetransmission( const QuicUnackedPacketMap::TransmissionInfo& transmission_info = unacked_packets_.GetTransmissionInfo(sequence_number); LOG_IF(DFATAL, transmission_info.retransmittable_frames == NULL); - LOG_IF(DFATAL, transmission_info.sent_time == QuicTime::Zero()); // TODO(ianswett): Currently the RTO can fire while there are pending NACK // retransmissions for the same data, which is not ideal. if (ContainsKey(pending_retransmissions_, sequence_number)) { @@ -261,13 +246,28 @@ QuicSentPacketManager::PendingRetransmission DCHECK(!pending_retransmissions_.empty()); QuicPacketSequenceNumber sequence_number = pending_retransmissions_.begin()->first; + TransmissionType transmission_type = pending_retransmissions_.begin()->second; + if (unacked_packets_.HasPendingCryptoPackets()) { + // Ensure crypto packets are retransmitted before other packets. + PendingRetransmissionMap::const_iterator it = + pending_retransmissions_.begin(); + do { + if (HasCryptoHandshake( + unacked_packets_.GetTransmissionInfo(it->first))) { + sequence_number = it->first; + transmission_type = it->second; + break; + } + ++it; + } while (it != pending_retransmissions_.end()); + } DCHECK(unacked_packets_.IsUnacked(sequence_number)); const QuicUnackedPacketMap::TransmissionInfo& transmission_info = unacked_packets_.GetTransmissionInfo(sequence_number); DCHECK(transmission_info.retransmittable_frames); return PendingRetransmission(sequence_number, - pending_retransmissions_.begin()->second, + transmission_type, *transmission_info.retransmittable_frames, transmission_info.sequence_number_length); } @@ -372,7 +372,6 @@ bool QuicSentPacketManager::OnPacketSent( // Only track packets the send algorithm wants us to track. if (!send_algorithm_->OnPacketSent(sent_time, sequence_number, bytes, - transmission_type, has_retransmittable_data)) { unacked_packets_.RemovePacket(sequence_number); // Do not reset the retransmission timer, since the packet isn't tracked. @@ -605,10 +604,13 @@ void QuicSentPacketManager::MaybeUpdateRTT( QuicTime::Delta QuicSentPacketManager::TimeUntilSend( QuicTime now, TransmissionType transmission_type, - HasRetransmittableData retransmittable, - IsHandshake handshake) { - return send_algorithm_->TimeUntilSend(now, transmission_type, retransmittable, - handshake); + HasRetransmittableData retransmittable) { + // The TLP logic is entirely contained within QuicSentPacketManager, so the + // send algorithm does not need to be consulted. + if (transmission_type == TLP_RETRANSMISSION) { + return QuicTime::Delta::Zero(); + } + return send_algorithm_->TimeUntilSend(now, retransmittable); } // Ensures that the Delayed Ack timer is always set to a value lesser |