# HG changeset patch # User Alexander Afanasyev # Date 1325616658 28800 # Node ID 26475eb01395071b96caccfcc260d0204187f120 # Parent f74f38356310f88e70b249e4c1a5dddd15a68795 Bug with RTT estimator. Upon reset, initial value is set to be 1ns, which causes abnormal behavior for large-RTT links diff -r f74f38356310 -r 26475eb01395 src/internet/model/rtt-estimator.cc --- a/src/internet/model/rtt-estimator.cc Tue Jan 03 00:21:35 2012 -0800 +++ b/src/internet/model/rtt-estimator.cc Tue Jan 03 10:50:58 2012 -0800 @@ -76,6 +76,7 @@ RttEstimator::SetEstimate (Time estimate) { est = estimate; + initialEst = est; } Time RttEstimator::GetEstimate (void) const @@ -183,7 +184,7 @@ void RttEstimator::Reset () { // Reset to initial state next = 1; - est = 1; // XXX: we should go back to the 'initial value' here. Need to add support in Object for this. + est = initialEst; // XXX: we should go back to the 'initial value' here. Need to add support in Object for this. history.clear (); // Remove all info from the history nSamples = 0; ResetMultiplier (); diff -r f74f38356310 -r 26475eb01395 src/internet/model/rtt-estimator.h --- a/src/internet/model/rtt-estimator.h Tue Jan 03 00:21:35 2012 -0800 +++ b/src/internet/model/rtt-estimator.h Tue Jan 03 10:50:58 2012 -0800 @@ -80,6 +80,7 @@ double m_maxMultiplier; public: int64x64_t est; // Current estimate + int64x64_t initialEst; // Initial value for estimate int64x64_t minrto; // minimum value of the timeout uint32_t nSamples; // Number of samples double multiplier; // RTO Multiplier