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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 731863007: Changes QUIC's SentPacketManager to pass in HAS_RETRANSMITTABLE_DATA to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Record_last_packet_send_time_80138676
Patch Set: Created 6 years, 1 month 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_sent_packet_manager.h ('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 7978fedc82c100361bc326d7b7fd61364ca45cfe..99b8bcf6897340bb5a2cee94985aaf4433679f97 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -323,6 +323,9 @@ void QuicSentPacketManager::RetransmitUnackedPackets(
(retransmission_type == ALL_UNACKED_RETRANSMISSION ||
frames->encryption_level() == ENCRYPTION_INITIAL)) {
MarkForRetransmission(sequence_number, retransmission_type);
+ } else if (it->is_fec_packet) {
+ // Remove FEC packets from the packet map, since we can't retransmit them.
+ unacked_packets_.RemoveFromInFlight(sequence_number);
}
}
}
@@ -549,12 +552,18 @@ bool QuicSentPacketManager::OnPacketSent(
}
// Only track packets as in flight that the send algorithm wants us to track.
+ // Since FEC packets should also be counted towards the congestion window,
+ // consider them as retransmittable for the purposes of congestion control.
+ HasRetransmittableData has_congestion_controlled_data =
+ serialized_packet->packet->is_fec_packet() ?
+ HAS_RETRANSMITTABLE_DATA : has_retransmittable_data;
const bool in_flight =
send_algorithm_->OnPacketSent(sent_time,
unacked_packets_.bytes_in_flight(),
sequence_number,
bytes,
- has_retransmittable_data);
+ has_congestion_controlled_data);
+
unacked_packets_.AddSentPacket(*serialized_packet,
original_sequence_number,
transmission_type,
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698