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

Unified Diff: net/quic/congestion_control/tcp_loss_algorithm.cc

Issue 523813003: Revert of Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | net/quic/congestion_control/time_loss_algorithm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/tcp_loss_algorithm.cc
diff --git a/net/quic/congestion_control/tcp_loss_algorithm.cc b/net/quic/congestion_control/tcp_loss_algorithm.cc
index 557681ee1864932a3da015054e208e03a97a259f..8dad3f18429279d8401424d3c727657b9767401a 100644
--- a/net/quic/congestion_control/tcp_loss_algorithm.cc
+++ b/net/quic/congestion_control/tcp_loss_algorithm.cc
@@ -37,34 +37,33 @@
loss_detection_timeout_ = QuicTime::Zero();
QuicTime::Delta loss_delay =
rtt_stats.SmoothedRtt().Multiply(kEarlyRetransmitLossDelayMultiplier);
- QuicPacketSequenceNumber sequence_number = unacked_packets.GetLeastUnacked();
+
for (QuicUnackedPacketMap::const_iterator it = unacked_packets.begin();
- it != unacked_packets.end() && sequence_number <= largest_observed;
- ++it, ++sequence_number) {
- if (!it->in_flight) {
+ it != unacked_packets.end() && it->first <= largest_observed; ++it) {
+ if (!it->second.in_flight) {
continue;
}
- LOG_IF(DFATAL, it->nack_count == 0)
+ LOG_IF(DFATAL, it->second.nack_count == 0)
<< "All packets less than largest observed should have been nacked.";
- if (it->nack_count >= kNumberOfNacksBeforeRetransmission) {
- lost_packets.insert(sequence_number);
+ if (it->second.nack_count >= kNumberOfNacksBeforeRetransmission) {
+ lost_packets.insert(it->first);
continue;
}
// Only early retransmit(RFC5827) when the last packet gets acked and
// there are retransmittable packets in flight.
// This also implements a timer-protected variant of FACK.
- if (it->retransmittable_frames &&
+ if (it->second.retransmittable_frames &&
unacked_packets.largest_sent_packet() == largest_observed) {
// Early retransmit marks the packet as lost once 1.25RTTs have passed
// since the packet was sent and otherwise sets an alarm.
- if (time >= it->sent_time.Add(loss_delay)) {
- lost_packets.insert(sequence_number);
+ if (time >= it->second.sent_time.Add(loss_delay)) {
+ lost_packets.insert(it->first);
} else {
// Set the timeout for the earliest retransmittable packet where early
// retransmit applies.
- loss_detection_timeout_ = it->sent_time.Add(loss_delay);
+ loss_detection_timeout_ = it->second.sent_time.Add(loss_delay);
break;
}
}
« no previous file with comments | « no previous file | net/quic/congestion_control/time_loss_algorithm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698