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

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

Issue 1037643002: Land Recent QUIC Changes until 03/22/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: deleted duplicated using statements in net/tools/quic/test_tools/quic_test_utils.cc Created 5 years, 9 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
Index: net/quic/congestion_control/tcp_cubic_bytes_sender.cc
diff --git a/net/quic/congestion_control/tcp_cubic_bytes_sender.cc b/net/quic/congestion_control/tcp_cubic_bytes_sender.cc
index 64737226f8c0faa95a256a0ff75399461cefb8b0..c9d71ee3bf614375f893efed9e0da22cef96b089 100644
--- a/net/quic/congestion_control/tcp_cubic_bytes_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_bytes_sender.cc
@@ -77,7 +77,8 @@ void TcpCubicBytesSender::SetFromConfig(const QuicConfig& config,
}
bool TcpCubicBytesSender::ResumeConnectionState(
- const CachedNetworkParameters& cached_network_params) {
+ const CachedNetworkParameters& cached_network_params,
+ bool max_bandwidth_resumption) {
// If the previous bandwidth estimate is less than an hour old, store in
// preparation for doing bandwidth resumption.
int64 seconds_since_estimate =
@@ -87,7 +88,9 @@ bool TcpCubicBytesSender::ResumeConnectionState(
}
QuicBandwidth bandwidth = QuicBandwidth::FromBytesPerSecond(
- cached_network_params.bandwidth_estimate_bytes_per_second());
+ max_bandwidth_resumption
+ ? cached_network_params.max_bandwidth_estimate_bytes_per_second()
+ : cached_network_params.bandwidth_estimate_bytes_per_second());
QuicTime::Delta rtt_ms =
QuicTime::Delta::FromMilliseconds(cached_network_params.min_rtt_ms());
@@ -107,6 +110,11 @@ void TcpCubicBytesSender::SetNumEmulatedConnections(int num_connections) {
cubic_.SetNumConnections(num_connections_);
}
+void TcpCubicBytesSender::SetMaxCongestionWindow(
+ QuicByteCount max_congestion_window) {
+ max_congestion_window_ = max_congestion_window;
+}
+
float TcpCubicBytesSender::RenoBeta() const {
// kNConnectionBeta is the backoff factor after loss for our N-connection
// emulation, which emulates the effective backoff of an ensemble of N
@@ -197,6 +205,10 @@ bool TcpCubicBytesSender::OnPacketSent(
QuicPacketSequenceNumber sequence_number,
QuicByteCount bytes,
HasRetransmittableData is_retransmittable) {
+ if (InSlowStart()) {
+ ++(stats_->slowstart_packets_sent);
+ }
+
// Only update bytes_in_flight_ for data packets.
if (is_retransmittable != HAS_RETRANSMITTABLE_DATA) {
return false;
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.h ('k') | net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698