better filter and cubic fixes

This commit is contained in:
2023-09-08 00:41:25 +02:00
parent f91780c602
commit 7af5fda0a6
5 changed files with 43 additions and 4 deletions

View File

@@ -37,12 +37,17 @@ void CUBIC::onCongestion(void) {
const auto tmp_old_tp = getTimeNow() - _time_point_reduction;
const auto current_cwnd = getCWnD();
const auto current_wnd = getWindow(); // respects cwnd and fwnd
_time_point_reduction = getTimeNow();
_window_max = current_cwnd * BETA;
//_window_max = current_cwnd * BETA;
_window_max = current_wnd * BETA;
_window_max = std::max(_window_max, 2.*MAXIMUM_SEGMENT_SIZE);
#if 1
std::cout << "----CONGESTION!"
<< " cwnd:" << current_cwnd
<< " wnd:" << current_wnd
<< " cwnd_max:" << _window_max
<< " pts:" << tmp_old_tp
<< " rtt:" << getCurrentDelay()
@@ -52,6 +57,10 @@ void CUBIC::onCongestion(void) {
}
}
float CUBIC::getWindow(void) {
return std::min<float>(getCWnD(), FlowOnly::getWindow());
}
int64_t CUBIC::canSend(void) {
const auto fspace_pkgs = FlowOnly::canSend();