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

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

Issue 664923003: Allow QUIC's BBR TCP sender to pace based on min rtt and add an explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Removing_QUIC_VERSION_18_77603158
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/tcp_cubic_sender.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/tcp_cubic_sender.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender.cc b/net/quic/congestion_control/tcp_cubic_sender.cc
index 0aae5fdea714c109ed5fbcf3c3aff448fa03d74d..0a0b6ae38bde0cd8344f5d0194f7639c893fd435 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc
@@ -204,6 +204,13 @@ QuicByteCount TcpCubicSender::SendWindow() const {
return min(receive_window_, GetCongestionWindow());
}
+QuicBandwidth TcpCubicSender::PacingRate() const {
+ // 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.
+ return BandwidthEstimate().Scale(InSlowStart() ? 2 : 1.25);
+}
+
QuicBandwidth TcpCubicSender::BandwidthEstimate() const {
return QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(),
rtt_stats_->SmoothedRtt());
@@ -217,9 +224,8 @@ QuicTime::Delta TcpCubicSender::RetransmissionDelay() const {
if (!rtt_stats_->HasUpdates()) {
return QuicTime::Delta::Zero();
}
- return QuicTime::Delta::FromMicroseconds(
- rtt_stats_->SmoothedRtt().ToMicroseconds() +
- 4 * rtt_stats_->mean_deviation().ToMicroseconds());
+ return rtt_stats_->SmoothedRtt().Add(
+ rtt_stats_->mean_deviation().Multiply(4));
}
QuicByteCount TcpCubicSender::GetCongestionWindow() const {
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.h ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698