Ensures that BBR always reports updated state.
The BBR controller did not properly report updates to congestion windows. This was due to a check to avoid the overhead of callbacks. In the current design without callbacks in the controller, the check can be removed. If helpful for performance, it should live outside of the controller. Bug: webrtc:8415 Change-Id: Idf6d6e76fe6d0450841e706019110307e559c11d Reviewed-on: https://webrtc-review.googlesource.com/78181 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23363}
This commit is contained in:
parent
500e75b467
commit
67535428b4
@ -84,11 +84,6 @@ constexpr int64_t kDefaultMaxCongestionWindowBytes =
|
||||
(kMaxRttMs * kMaxBandwidthKbps) / 8;
|
||||
} // namespace
|
||||
|
||||
BbrNetworkController::UpdateState::UpdateState() = default;
|
||||
BbrNetworkController::UpdateState::UpdateState(
|
||||
const BbrNetworkController::UpdateState&) = default;
|
||||
BbrNetworkController::UpdateState::~UpdateState() = default;
|
||||
|
||||
BbrNetworkController::BbrControllerConfig
|
||||
BbrNetworkController::BbrControllerConfig::DefaultConfig() {
|
||||
BbrControllerConfig config;
|
||||
@ -196,12 +191,6 @@ void BbrNetworkController::Reset() {
|
||||
round_trip_count_ = 0;
|
||||
rounds_without_bandwidth_gain_ = 0;
|
||||
is_at_full_bandwidth_ = false;
|
||||
last_update_state_.mode = Mode::STARTUP;
|
||||
last_update_state_.bandwidth.reset();
|
||||
last_update_state_.rtt.reset();
|
||||
last_update_state_.pacing_rate.reset();
|
||||
last_update_state_.target_rate.reset();
|
||||
last_update_state_.probing_for_bandwidth = false;
|
||||
EnterStartupMode();
|
||||
}
|
||||
|
||||
@ -224,20 +213,6 @@ NetworkControlUpdate BbrNetworkController::CreateRateUpdate(Timestamp at_time) {
|
||||
if (constraints_->min_data_rate)
|
||||
target_rate = std::max(target_rate, *constraints_->min_data_rate);
|
||||
}
|
||||
bool probing_for_bandwidth = IsProbingForMoreBandwidth();
|
||||
if (last_update_state_.mode == mode_ &&
|
||||
last_update_state_.bandwidth == bandwidth &&
|
||||
last_update_state_.rtt == rtt &&
|
||||
last_update_state_.pacing_rate == pacing_rate &&
|
||||
last_update_state_.target_rate == target_rate &&
|
||||
last_update_state_.probing_for_bandwidth == probing_for_bandwidth)
|
||||
return NetworkControlUpdate();
|
||||
last_update_state_.mode = mode_;
|
||||
last_update_state_.bandwidth = bandwidth;
|
||||
last_update_state_.rtt = rtt;
|
||||
last_update_state_.pacing_rate = pacing_rate;
|
||||
last_update_state_.target_rate = target_rate;
|
||||
last_update_state_.probing_for_bandwidth = probing_for_bandwidth;
|
||||
|
||||
NetworkControlUpdate update;
|
||||
|
||||
|
||||
@ -157,19 +157,6 @@ class BbrNetworkController : public NetworkControllerInterface {
|
||||
// recently app limited.
|
||||
bool probe_rtt_disabled_if_app_limited;
|
||||
};
|
||||
// Containing values that when changed should trigger an update.
|
||||
struct UpdateState {
|
||||
UpdateState();
|
||||
UpdateState(const UpdateState&);
|
||||
~UpdateState();
|
||||
Mode mode = Mode::STARTUP;
|
||||
rtc::Optional<DataRate> bandwidth;
|
||||
rtc::Optional<TimeDelta> rtt;
|
||||
rtc::Optional<DataRate> pacing_rate;
|
||||
rtc::Optional<DataRate> target_rate;
|
||||
bool probing_for_bandwidth = false;
|
||||
};
|
||||
|
||||
void Reset();
|
||||
NetworkControlUpdate CreateRateUpdate(Timestamp at_time);
|
||||
|
||||
@ -390,7 +377,6 @@ class BbrNetworkController : public NetworkControllerInterface {
|
||||
|
||||
bool app_limited_since_last_probe_rtt_ = false;
|
||||
TimeDelta min_rtt_since_last_probe_rtt_ = TimeDelta::PlusInfinity();
|
||||
UpdateState last_update_state_;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(BbrNetworkController);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user