diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-31 23:17:14 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-31 23:17:14 +0000 |
commit | c5cc9bd03a52d4c96d5e00efe4633ae965c4dcfd (patch) | |
tree | 8910a2ed2f88a1751e8ea7823b7b2bc3c64da124 /net/quic/congestion_control | |
parent | 45a4f1ff5da3196aa03cfbe3862f57a1e1eb029c (diff) | |
download | chromium_src-c5cc9bd03a52d4c96d5e00efe4633ae965c4dcfd.zip chromium_src-c5cc9bd03a52d4c96d5e00efe4633ae965c4dcfd.tar.gz chromium_src-c5cc9bd03a52d4c96d5e00efe4633ae965c4dcfd.tar.bz2 |
Land Recent QUIC Changes.
Add a QUIC flag to enable time based loss detection as the default.
Merge internal change: 63942432
(this CL was merged in https://codereview.chromium.org/217133004/
added FLAGS_quic_use_time_loss_detection to quic_flags.cc
and made the change to quic_connection.cc also).
Now that we have a default send window, no need to send WINDOW_UPDATE to
ensure streams are not flow control blocked
Merge internal change: 63887815
https://codereview.chromium.org/217003005/
Changing the max stream delta to allow for all open streams in a given
direction. Previously, we allowed 100 streams (200 even/odd stream ids)
but an insufficient delta of 100.
Allowing a slightly larger stream delta for QUIC.
Merge internal change: 63880428
https://codereview.chromium.org/212063006/
UDP proxy session for QUIC. This is not production ready. Major issues
include the sharding issue and the time wait list.
Merge internal change: 63878878
https://codereview.chromium.org/216943004/
Don't try and close a QUIC connection twice while processing a single
incoming packet.
Merge internal change: 63878490
https://codereview.chromium.org/217053004/
Added missing OVERRIDE.
Add the ability to negotiate the QUIC loss detection algorithm in the
crypto handshake.
Added FLAGS_quic_congestion_control_inter_arrival and
FLAGS_quic_use_time_loss_detection. They default to false.
Merge internal change: 63874474
https://codereview.chromium.org/217133004/
Send BLOCKED frame directly from ReliableQuicStream.
Merge internal change: 63808643
https://codereview.chromium.org/216423006/
Simplified ReliableQuicStream::IsFlowControlBlocked.
Merge internal change: 63807857
https://codereview.chromium.org/217103003/
Track the sent_time for ack packets so the RTT is updated when ack
packets are acked as the largest observed.
Merge internal change: 63806273
https://codereview.chromium.org/216423005/
R=rch@chromium.org
Review URL: https://codereview.chromium.org/217303003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/congestion_control')
8 files changed, 28 insertions, 5 deletions
diff --git a/net/quic/congestion_control/loss_detection_interface.cc b/net/quic/congestion_control/loss_detection_interface.cc index ddb5b43..035848c 100644 --- a/net/quic/congestion_control/loss_detection_interface.cc +++ b/net/quic/congestion_control/loss_detection_interface.cc @@ -5,12 +5,21 @@ #include "net/quic/congestion_control/loss_detection_interface.h" #include "net/quic/congestion_control/tcp_loss_algorithm.h" +#include "net/quic/congestion_control/time_loss_algorithm.h" namespace net { // Factory for loss detection algorithm. -LossDetectionInterface* LossDetectionInterface::Create() { - return new TCPLossAlgorithm(); +LossDetectionInterface* LossDetectionInterface::Create( + LossDetectionType loss_type) { + switch (loss_type) { + case kNack: + return new TCPLossAlgorithm(); + case kTime: + return new TimeLossAlgorithm(); + } + LOG(DFATAL) << "Unknown loss detection algorithm:" << loss_type; + return NULL; } } // namespace net diff --git a/net/quic/congestion_control/loss_detection_interface.h b/net/quic/congestion_control/loss_detection_interface.h index 21cc4f7..5aaa51d 100644 --- a/net/quic/congestion_control/loss_detection_interface.h +++ b/net/quic/congestion_control/loss_detection_interface.h @@ -19,10 +19,12 @@ class RttStats; class NET_EXPORT_PRIVATE LossDetectionInterface { public: // Creates a TCP loss detector. - static LossDetectionInterface* Create(); + static LossDetectionInterface* Create(LossDetectionType loss_type); virtual ~LossDetectionInterface() {} + virtual LossDetectionType GetLossDetectionType() const = 0; + // Called when a new ack arrives or the loss alarm fires. virtual SequenceNumberSet DetectLostPackets( const QuicUnackedPacketMap& unacked_packets, diff --git a/net/quic/congestion_control/tcp_loss_algorithm.cc b/net/quic/congestion_control/tcp_loss_algorithm.cc index d63742a..70198d6 100644 --- a/net/quic/congestion_control/tcp_loss_algorithm.cc +++ b/net/quic/congestion_control/tcp_loss_algorithm.cc @@ -23,6 +23,10 @@ static const double kEarlyRetransmitLossDelayMultiplier = 1.25; TCPLossAlgorithm::TCPLossAlgorithm() : loss_detection_timeout_(QuicTime::Zero()) { } +LossDetectionType TCPLossAlgorithm::GetLossDetectionType() const { + return kNack; +} + // Uses nack counts to decide when packets are lost. SequenceNumberSet TCPLossAlgorithm::DetectLostPackets( const QuicUnackedPacketMap& unacked_packets, diff --git a/net/quic/congestion_control/tcp_loss_algorithm.h b/net/quic/congestion_control/tcp_loss_algorithm.h index e8b2da1..06f6256 100644 --- a/net/quic/congestion_control/tcp_loss_algorithm.h +++ b/net/quic/congestion_control/tcp_loss_algorithm.h @@ -23,6 +23,8 @@ class NET_EXPORT_PRIVATE TCPLossAlgorithm : public LossDetectionInterface { TCPLossAlgorithm(); virtual ~TCPLossAlgorithm() {} + virtual LossDetectionType GetLossDetectionType() const OVERRIDE; + // Uses nack counts to decide when packets are lost. virtual SequenceNumberSet DetectLostPackets( const QuicUnackedPacketMap& unacked_packets, diff --git a/net/quic/congestion_control/tcp_loss_algorithm_test.cc b/net/quic/congestion_control/tcp_loss_algorithm_test.cc index bc9db2a..7d8cdee1 100644 --- a/net/quic/congestion_control/tcp_loss_algorithm_test.cc +++ b/net/quic/congestion_control/tcp_loss_algorithm_test.cc @@ -27,7 +27,7 @@ class TcpLossAlgorithmTest : public ::testing::Test { SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, new RetransmittableFrames()); unacked_packets_.AddPacket(packet); - unacked_packets_.SetPending(sequence_number, clock_.Now(), 1000); + unacked_packets_.SetSent(sequence_number, clock_.Now(), 1000, true); } void VerifyLosses(QuicPacketSequenceNumber largest_observed, diff --git a/net/quic/congestion_control/time_loss_algorithm.cc b/net/quic/congestion_control/time_loss_algorithm.cc index dbdb52a..6cf1d81 100644 --- a/net/quic/congestion_control/time_loss_algorithm.cc +++ b/net/quic/congestion_control/time_loss_algorithm.cc @@ -23,6 +23,10 @@ static const double kLossDelayMultiplier = 1.25; TimeLossAlgorithm::TimeLossAlgorithm() : loss_detection_timeout_(QuicTime::Zero()) { } +LossDetectionType TimeLossAlgorithm::GetLossDetectionType() const { + return kTime; +} + SequenceNumberSet TimeLossAlgorithm::DetectLostPackets( const QuicUnackedPacketMap& unacked_packets, const QuicTime& time, diff --git a/net/quic/congestion_control/time_loss_algorithm.h b/net/quic/congestion_control/time_loss_algorithm.h index a5cecc1..5c6fc2a 100644 --- a/net/quic/congestion_control/time_loss_algorithm.h +++ b/net/quic/congestion_control/time_loss_algorithm.h @@ -23,6 +23,8 @@ class NET_EXPORT_PRIVATE TimeLossAlgorithm : public LossDetectionInterface { TimeLossAlgorithm(); virtual ~TimeLossAlgorithm() {} + virtual LossDetectionType GetLossDetectionType() const OVERRIDE; + // Declares pending packets less than the largest observed lost when it has // been 1.25 RTT since they were sent. Packets larger than the largest // observed are retransmitted via TLP. diff --git a/net/quic/congestion_control/time_loss_algorithm_test.cc b/net/quic/congestion_control/time_loss_algorithm_test.cc index 43969a9..d9605e3 100644 --- a/net/quic/congestion_control/time_loss_algorithm_test.cc +++ b/net/quic/congestion_control/time_loss_algorithm_test.cc @@ -27,7 +27,7 @@ class TimeLossAlgorithmTest : public ::testing::Test { SerializedPacket packet(sequence_number, PACKET_1BYTE_SEQUENCE_NUMBER, NULL, 0, new RetransmittableFrames()); unacked_packets_.AddPacket(packet); - unacked_packets_.SetPending(sequence_number, clock_.Now(), 1000); + unacked_packets_.SetSent(sequence_number, clock_.Now(), 1000, true); } void VerifyLosses(QuicPacketSequenceNumber largest_observed, |