make cubic and flow more resilient

This commit is contained in:
2023-09-01 15:51:28 +02:00
parent 4ee5dd6ca5
commit a1a9bf886a
4 changed files with 18 additions and 12 deletions

View File

@@ -33,12 +33,14 @@ float CUBIC::getCWnD(void) const {
}
void CUBIC::onCongestion(void) {
if (getTimeNow() - _time_point_reduction >= getCurrentDelay()) {
if (getTimeNow() - _time_point_reduction >= getCurrentDelay()*4.f) {
const auto current_cwnd = getCWnD();
_time_point_reduction = getTimeNow();
_window_max = current_cwnd;
_window_max = current_cwnd * BETA;
_window_max = std::max(_window_max, 2.*MAXIMUM_SEGMENT_SIZE);
std::cout << "CONGESTION! cwnd:" << current_cwnd << "\n";
//std::cout << "CONGESTION! cwnd:" << current_cwnd << "\n";
std::cout << "CONGESTION! cwnd_max:" << _window_max << "\n";
}
}