mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-08-04 23:35:06 +02:00
keep track of num RTT and debug reno fallback
This commit is contained in:
parent
2c026d7b0f
commit
dbbdda3468
2 changed files with 12 additions and 0 deletions
|
@ -52,6 +52,9 @@ bool TCPVegasCC::onACK(SequenceNumber ack, p_high_resolution_clock::time_point r
|
|||
+ abs(lastRTT - _ewmaRTT)) / RTT_ESTIMATION_VARIANCE_ALPHA_NUMERATOR;
|
||||
}
|
||||
|
||||
// add 1 to the number of RTT samples
|
||||
++_numRTTs;
|
||||
|
||||
// keep track of the lowest RTT during connection
|
||||
_baseRTT = std::min(_baseRTT, lastRTT);
|
||||
|
||||
|
@ -129,6 +132,10 @@ void TCPVegasCC::performCongestionAvoidance(udt::SequenceNumber ack) {
|
|||
debug << "D:" << windowSizeDiff << "\n";
|
||||
}
|
||||
|
||||
if (_numRTTs <= 2) {
|
||||
qDebug() << "WE SHOULD BE USING RENO HERE" << _numRTTs;
|
||||
}
|
||||
|
||||
if (_slowStart) {
|
||||
if (windowSizeDiff > VEGAS_GAMMA_SEGMENTS) {
|
||||
// we're going too fast - this breaks us out of slow start and we switch to linear increase/decrease
|
||||
|
@ -175,6 +182,9 @@ void TCPVegasCC::performCongestionAvoidance(udt::SequenceNumber ack) {
|
|||
// reset our state for the next RTT
|
||||
_currentMinRTT = std::numeric_limits<int>::max();
|
||||
|
||||
// reset our count of collected RTT samples
|
||||
_numRTTs = 0;
|
||||
|
||||
if (wantDebug) {
|
||||
debug << "CW:" << _congestionWindowSize << "SS:" << _slowStart << "\n";
|
||||
debug << "============";
|
||||
|
|
|
@ -59,6 +59,8 @@ private:
|
|||
int _ewmaRTT { -1 }; // Exponential weighted moving average RTT
|
||||
int _rttVariance { 0 }; // Variance in collected RTT values
|
||||
|
||||
int _numRTTs { 0 }; // Holds the number of ACKs received during the last RTT
|
||||
|
||||
int _slowStartOddAdjust { 0 }; // Marker for every window adjustment every other RTT in slow-start
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue