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

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

Issue 1276983003: relnote: Limit the number of burst tokens in QUIC's pacing sender to the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Preparation_for_changing_SpdyHeaderBlock_99394725
Patch Set: Created 5 years, 4 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 bbcae0c69a0cec157c1d789143a4f1fe61fe0c6f..c6f33efd5c4307faf24bf40c4b588275aea5f3ea 100644
--- a/net/quic/congestion_control/pacing_sender.cc
+++ b/net/quic/congestion_control/pacing_sender.cc
@@ -4,6 +4,10 @@
#include "net/quic/congestion_control/pacing_sender.h"
+#include "net/quic/quic_flags.h"
+
+using std::min;
+
namespace net {
PacingSender::PacingSender(SendAlgorithmInterface* sender,
@@ -61,8 +65,16 @@ bool PacingSender::OnPacketSent(
return in_flight;
}
if (bytes_in_flight == 0) {
- // Add more burst tokens anytime the connection is leaving quiescence.
- burst_tokens_ = initial_packet_burst_;
+ // Add more burst tokens anytime the connection is leaving quiescence, but
+ // limit it to the equivalent of a single bulk write, not exceeding the
+ // current CWND in packets.
+ if (FLAGS_quic_limit_pacing_burst) {
+ burst_tokens_ = min(
+ initial_packet_burst_,
+ static_cast<uint32>(sender_->GetCongestionWindow() / kDefaultTCPMSS));
+ } else {
+ burst_tokens_ = initial_packet_burst_;
+ }
}
if (burst_tokens_ > 0) {
--burst_tokens_;
« 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