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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.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/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index c0041978a2fd498319dc1a88dc3d7e7482f25ee5..553e7e2f69a188ed7a7c2bb78c34323ab5741cf7 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -78,6 +78,7 @@ QuicSentPacketManager::QuicSentPacketManager(
congestion_control_type,
stats)),
loss_algorithm_(LossDetectionInterface::Create(loss_type)),
+ receive_buffer_bytes_(kDefaultSocketReceiveBuffer),
least_packet_awaited_by_peer_(1),
first_rto_transmission_(0),
consecutive_rto_count_(0),
@@ -103,7 +104,8 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
config.GetInitialRoundTripTimeUsToSend()));
}
// TODO(ianswett): BBR is currently a server only feature.
- if (config.HasReceivedConnectionOptions() &&
+ if (FLAGS_quic_allow_bbr &&
+ config.HasReceivedConnectionOptions() &&
ContainsQuicTag(config.ReceivedConnectionOptions(), kTBBR)) {
if (FLAGS_quic_recent_min_rtt_window_s > 0) {
rtt_stats_.set_recent_min_rtt_window(
@@ -123,10 +125,18 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
if (HasClientSentConnectionOption(config, k1CON)) {
send_algorithm_->SetNumEmulatedConnections(1);
}
+ if (HasClientSentConnectionOption(config, kNTLP)) {
+ max_tail_loss_probes_ = 0;
+ }
if (config.HasReceivedConnectionOptions() &&
ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) {
loss_algorithm_.reset(LossDetectionInterface::Create(kTime));
}
+ if (config.HasReceivedSocketReceiveBuffer()) {
+ receive_buffer_bytes_ =
+ max(kMinSocketReceiveBuffer,
+ static_cast<QuicByteCount>(config.ReceivedSocketReceiveBuffer()));
+ }
send_algorithm_->SetFromConfig(config, is_server_);
if (network_change_visitor_ != nullptr) {
@@ -664,8 +674,9 @@ QuicSentPacketManager::RetransmissionTimeoutMode
void QuicSentPacketManager::OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& frame,
const QuicTime& feedback_receive_time) {
- send_algorithm_->OnIncomingQuicCongestionFeedbackFrame(
- frame, feedback_receive_time);
+ if (frame.type == kTCP) {
+ receive_buffer_bytes_ = frame.tcp.receive_window;
+ }
}
void QuicSentPacketManager::InvokeLossDetection(QuicTime time) {
@@ -730,6 +741,9 @@ QuicTime::Delta QuicSentPacketManager::TimeUntilSend(
if (pending_timer_transmission_count_ > 0) {
return QuicTime::Delta::Zero();
}
+ if (unacked_packets_.bytes_in_flight() >= receive_buffer_bytes_) {
+ return QuicTime::Delta::Infinite();
+ }
return send_algorithm_->TimeUntilSend(
now, unacked_packets_.bytes_in_flight(), retransmittable);
}
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698