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

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

Issue 667763003: Landing Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/pacing_sender.cc
diff --git a/net/quic/congestion_control/pacing_sender.cc b/net/quic/congestion_control/pacing_sender.cc
index 03e553477ced4ea1e0f08ae81e63e838d8bf3f0d..d53fccc77321c8a1c0c0a7cd883bf629df5a95a0 100644
--- a/net/quic/congestion_control/pacing_sender.cc
+++ b/net/quic/congestion_control/pacing_sender.cc
@@ -62,13 +62,9 @@ bool PacingSender::OnPacketSent(
next_packet_send_time_ = QuicTime::Zero();
return in_flight;
}
- // The next packet should be sent as soon as the current packets has
- // been transferred. We pace at twice the rate of the underlying
- // sender's bandwidth estimate during slow start and 1.25x during congestion
- // avoidance to ensure pacing doesn't prevent us from filling the window.
- const float kPacingAggression = sender_->InSlowStart() ? 2 : 1.25;
- QuicTime::Delta delay =
- BandwidthEstimate().Scale(kPacingAggression).TransferTime(bytes);
+ // The next packet should be sent as soon as the current packets has been
+ // transferred.
+ QuicTime::Delta delay = PacingRate().TransferTime(bytes);
// If the last send was delayed, and the alarm took a long time to get
// invoked, allow the connection to make up for lost time.
if (was_last_send_delayed_) {
@@ -145,6 +141,10 @@ QuicTime::Delta PacingSender::TimeUntilSend(
return QuicTime::Delta::Zero();
}
+QuicBandwidth PacingSender::PacingRate() const {
+ return sender_->PacingRate();
+}
+
QuicBandwidth PacingSender::BandwidthEstimate() const {
return sender_->BandwidthEstimate();
}
« no previous file with comments | « net/quic/congestion_control/pacing_sender.h ('k') | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698