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

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

Issue 1811043002: Landing Recent QUIC changes until 2016-03-15 16:26 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an export clause. Created 4 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_sender_bytes.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_bytes.cc b/net/quic/congestion_control/tcp_cubic_sender_bytes.cc
index 398048782718d63d3193d67b515ba5f7717428d1..863def3b366bd2b7bbf3576ef47e94fe1914c74c 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_bytes.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_bytes.cc
@@ -81,16 +81,18 @@ void TcpCubicSenderBytes::ExitSlowstart() {
}
void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number,
+ QuicByteCount lost_bytes,
QuicByteCount bytes_in_flight) {
// TCP NewReno (RFC6582) says that once a loss occurs, any losses in packets
// already sent should be treated as a single loss event, since it's expected.
if (packet_number <= largest_sent_at_last_cutback_) {
if (last_cutback_exited_slowstart_) {
++stats_->slowstart_packets_lost;
+ stats_->slowstart_bytes_lost += lost_bytes;
if (slow_start_large_reduction_) {
- // Reduce congestion window by 1 MSS for every loss.
+ // Reduce congestion window by lost_bytes for every loss.
congestion_window_ =
- max(congestion_window_ - kDefaultTCPMSS, min_congestion_window_);
+ max(congestion_window_ - lost_bytes, min_congestion_window_);
slowstart_threshold_ = congestion_window_;
}
}
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_bytes.h ('k') | net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698