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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
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..142871ef597822975e52fb2bf0079a8c1d801985 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -163,6 +163,11 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
}
}
+void QuicSentPacketManager::ResumeConnectionState(
+ const CachedNetworkParameters& cached_network_params) {
+ send_algorithm_->ResumeConnectionState(cached_network_params);
+}
+
void QuicSentPacketManager::SetNumOpenStreams(size_t num_streams) {
if (n_connection_simulation_) {
// Ensure the number of connections is between 1 and 5.
@@ -323,6 +328,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 +557,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