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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 182063002: Add a time based loss detection algorithm to QUIC that loses packets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index ad83057217a17e8f2f3ab7caa674a890c66d30e6..9ac7210031e9dc39fbf7c29c1287a8f34e057b91 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -399,9 +399,10 @@ bool QuicSentPacketManager::OnPacketSent(
void QuicSentPacketManager::OnRetransmissionTimeout() {
DCHECK(unacked_packets_.HasPendingPackets());
- // Handshake retransmission, TLP, and RTO are implemented with a single alarm.
- // The handshake alarm is set when the handshake has not completed, and the
- // TLP and RTO alarms are set after that.
+ // Handshake retransmission, timer based loss detection, TLP, and RTO are
+ // implemented with a single alarm. The handshake alarm is set when the
+ // handshake has not completed, the loss alarm is set when the loss detection
+ // algorithm says to, and the TLP and RTO alarms are set after that.
// The TLP alarm is always set to run for under an RTO.
switch (GetRetransmissionMode()) {
case HANDSHAKE_MODE:
@@ -409,6 +410,7 @@ void QuicSentPacketManager::OnRetransmissionTimeout() {
RetransmitCryptoPackets();
return;
case LOSS_MODE:
+ ++stats_->loss_timeout_count;
InvokeLossDetection(clock_->Now());
return;
case TLP_MODE:
@@ -560,7 +562,8 @@ void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
loss_algorithm_->DetectLostPackets(unacked_packets_,
time,
largest_observed_,
- send_algorithm_->SmoothedRtt());
+ send_algorithm_->SmoothedRtt(),
+ rtt_sample_);
for (SequenceNumberSet::const_iterator it = lost_packets.begin();
it != lost_packets.end(); ++it) {
QuicPacketSequenceNumber sequence_number = *it;
« no previous file with comments | « net/quic/quic_connection_test.cc ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698