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

Unified Diff: net/quic/congestion_control/time_loss_algorithm.h

Issue 182523002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed rch's comments in Patch set 1 of CL 181463007 Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/congestion_control/time_loss_algorithm.h
diff --git a/net/quic/congestion_control/tcp_loss_algorithm.h b/net/quic/congestion_control/time_loss_algorithm.h
similarity index 36%
copy from net/quic/congestion_control/tcp_loss_algorithm.h
copy to net/quic/congestion_control/time_loss_algorithm.h
index 7c42c9f76afa66add65580b5025dce11dba1e0ab..437a8837676bf28fa6be0884392d229d1394b3dd 100644
--- a/net/quic/congestion_control/tcp_loss_algorithm.h
+++ b/net/quic/congestion_control/time_loss_algorithm.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_
-#define NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_
+#ifndef NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_
+#define NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_
#include <algorithm>
#include <map>
@@ -16,21 +16,34 @@
namespace net {
-// Class which implement's TCP's approach of detecting loss when 3 nacks have
-// been received for a packet. Also implements TCP's early retransmit(RFC5827).
-class NET_EXPORT_PRIVATE TCPLossAlgorithm : public LossDetectionInterface {
+// A loss detection algorithm which avoids spurious losses and retransmissions
+// by waiting 1.25 RTTs after a packet was sent instead of nack count.
+class NET_EXPORT_PRIVATE TimeLossAlgorithm : public LossDetectionInterface {
public:
- TCPLossAlgorithm();
- virtual ~TCPLossAlgorithm() {}
+ TimeLossAlgorithm();
+ virtual ~TimeLossAlgorithm() {}
- // Uses nack counts to decide when packets are lost.
+ // 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.
virtual SequenceNumberSet DetectLostPackets(
const QuicUnackedPacketMap& unacked_packets,
const QuicTime& time,
QuicPacketSequenceNumber largest_observed,
- QuicTime::Delta srtt) OVERRIDE;
+ QuicTime::Delta srtt,
+ QuicTime::Delta latest_rtt) OVERRIDE;
+
+ // Returns the time the next packet will be lost, or zero if there
+ // are no nacked pending packets outstanding.
+ // TODO(ianswett): Ideally the RTT variance and the RTT would be used to
+ // determine the time a packet is considered lost.
+ // TODO(ianswett): Consider using Max(1.25 * srtt, 1.125 * last_rtt).
+ virtual QuicTime GetLossTimeout() const OVERRIDE;
+
+ private:
+ QuicTime loss_detection_timeout_;
};
} // namespace net
-#endif // NET_QUIC_CONGESTION_CONTROL_TCP_LOSS_ALGORITHM_H_
+#endif // NET_QUIC_CONGESTION_CONTROL_TIME_LOSS_ALGORITHM_H_
« no previous file with comments | « net/quic/congestion_control/tcp_loss_algorithm_test.cc ('k') | net/quic/congestion_control/time_loss_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698