Pace at max of BWE and lower link capacity only when loss based estimate is not less than delay based estimate.

It is hard to add an unit test for this change, because OnTransportPacketsFeedback is the way to change the loss based estimate, and it also changes the lower link capacity.

Thus we cannot track the two values without making changes in goog_cc, which seem to be unecessary.

Bug: none
Change-Id: I689ef52c4440c9bc2ff30f88b9cda96a90b0b64e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256368
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36304}
This commit is contained in:
Diep Bui 2022-03-23 12:44:13 +00:00 committed by WebRTC LUCI CQ
parent a2219e22d2
commit 50f4ae1522
2 changed files with 7 additions and 1 deletions

View File

@ -92,6 +92,8 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config,
pace_at_max_of_bwe_and_lower_link_capacity_(
IsEnabled(key_value_config_,
"WebRTC-Bwe-PaceAtMaxOfBweAndLowerLinkCapacity")),
pace_at_loss_based_bwe_when_loss_(
IsEnabled(key_value_config_, "WebRTC-Bwe-PaceAtLossBaseBweWhenLoss")),
probe_controller_(
new ProbeController(key_value_config_, config.event_log)),
congestion_window_pushback_controller_(
@ -700,7 +702,10 @@ PacerConfig GoogCcNetworkController::GetPacingRates(Timestamp at_time) const {
// Pacing rate is based on target rate before congestion window pushback,
// because we don't want to build queues in the pacer when pushback occurs.
DataRate pacing_rate = DataRate::Zero();
if (pace_at_max_of_bwe_and_lower_link_capacity_ && estimate_) {
if ((pace_at_max_of_bwe_and_lower_link_capacity_ ||
(pace_at_loss_based_bwe_when_loss_ &&
last_loss_based_target_rate_ >= delay_based_bwe_->last_estimate())) &&
estimate_) {
pacing_rate =
std::max({min_total_allocated_bitrate_, estimate_->link_capacity_lower,
last_loss_based_target_rate_}) *

View File

@ -95,6 +95,7 @@ class GoogCcNetworkController : public NetworkControllerInterface {
const RateControlSettings rate_control_settings_;
const bool loss_based_stable_rate_;
const bool pace_at_max_of_bwe_and_lower_link_capacity_;
const bool pace_at_loss_based_bwe_when_loss_;
const std::unique_ptr<ProbeController> probe_controller_;
const std::unique_ptr<CongestionWindowPushbackController>