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

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

Issue 670533004: Fixes two div by zero bugs in QUIC's BBR pacing code that caused server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Simplify_QuicUnackedPacketMap_77986449
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/rtt_stats.h ('k') | net/quic/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/rtt_stats.cc
diff --git a/net/quic/congestion_control/rtt_stats.cc b/net/quic/congestion_control/rtt_stats.cc
index b03686d747e6621102e0dd7e11d125fdf261e528..d5f48697ef45f40b9fe0f183ad5b12a8374567d3 100644
--- a/net/quic/congestion_control/rtt_stats.cc
+++ b/net/quic/congestion_control/rtt_stats.cc
@@ -64,11 +64,11 @@ void RttStats::UpdateRtt(QuicTime::Delta send_delta,
}
if (rtt_sample.IsInfinite() || rtt_sample.IsZero()) {
- DVLOG(1) << "Ignoring rtt, because it's "
- << (rtt_sample.IsZero() ? "Zero" : "Infinite");
+ LOG(WARNING) << "Ignoring rtt, because it's "
+ << (rtt_sample.IsZero() ? "Zero" : "Infinite");
return;
}
- // RTT can't be negative.
+ // RTT can't be non-positive.
DCHECK_LT(0, rtt_sample.ToMicroseconds());
latest_rtt_ = rtt_sample;
@@ -138,4 +138,11 @@ QuicTime::Delta RttStats::SmoothedRtt() const {
return smoothed_rtt_;
}
+QuicTime::Delta RttStats::MinRtt() const {
+ if (!HasUpdates()) {
+ return QuicTime::Delta::FromMicroseconds(initial_rtt_us_);
+ }
+ return min_rtt_;
+}
+
} // namespace net
« no previous file with comments | « net/quic/congestion_control/rtt_stats.h ('k') | net/quic/congestion_control/rtt_stats_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698