From 632d57d3d0fd6926eb907cb9f8d818f9bfeac672 Mon Sep 17 00:00:00 2001 From: Per Kjellander Date: Mon, 28 Oct 2019 07:48:50 +0100 Subject: [PATCH] Ignore low probe results when using NetworkStateEstimator under field trial The feature is added as part a new field trial WebRTC-Bwe-IgnoreProbesLowerThanNetworkStateEstimate Bug: webrtc:10498 Change-Id: I72b3c73256a35e0583f4d595edef45848f8bbb22 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158260 Commit-Queue: Sebastian Jansson Reviewed-by: Sebastian Jansson Reviewed-by: Per Kjellander Cr-Commit-Position: refs/heads/master@{#29624} --- .../congestion_controller/goog_cc/delay_based_bwe.h | 2 +- .../goog_cc/goog_cc_network_control.cc | 12 ++++++++++-- .../goog_cc/goog_cc_network_control.h | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/congestion_controller/goog_cc/delay_based_bwe.h b/modules/congestion_controller/goog_cc/delay_based_bwe.h index 2cf8eb54b6..a2331b6223 100644 --- a/modules/congestion_controller/goog_cc/delay_based_bwe.h +++ b/modules/congestion_controller/goog_cc/delay_based_bwe.h @@ -62,9 +62,9 @@ class DelayBasedBwe { void SetMinBitrate(DataRate min_bitrate); TimeDelta GetExpectedBwePeriod() const; void SetAlrLimitedBackoffExperiment(bool enabled); - DataRate TriggerOveruse(Timestamp at_time, absl::optional link_capacity); + DataRate last_estimate() const { return prev_bitrate_; } private: friend class GoogCcStatePrinter; diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc index 6b94bf30dd..52ea5cecc1 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc @@ -72,6 +72,9 @@ GoogCcNetworkController::GoogCcNetworkController(NetworkControllerConfig config, "WebRTC-Bwe-CongestionWindowDownlinkDelay")), use_min_allocatable_as_lower_bound_( IsNotDisabled(key_value_config_, "WebRTC-Bwe-MinAllocAsLowerBound")), + ignore_probes_lower_than_network_estimate_( + IsEnabled(key_value_config_, + "WebRTC-Bwe-IgnoreProbesLowerThanNetworkStateEstimate")), rate_control_settings_( RateControlSettings::ParseFromKeyValueConfig(key_value_config_)), probe_controller_( @@ -489,8 +492,6 @@ NetworkControlUpdate GoogCcNetworkController::OnTransportPacketsFeedback( } } - absl::optional probe_bitrate = - probe_bitrate_estimator_->FetchAndResetLastEstimatedBitrate(); if (network_estimator_) { network_estimator_->OnTransportPacketsFeedback(report); auto prev_estimate = estimate_; @@ -503,6 +504,13 @@ NetworkControlUpdate GoogCcNetworkController::OnTransportPacketsFeedback( estimate_->link_capacity_lower, estimate_->link_capacity_upper)); } } + absl::optional probe_bitrate = + probe_bitrate_estimator_->FetchAndResetLastEstimatedBitrate(); + if (ignore_probes_lower_than_network_estimate_ && probe_bitrate && + estimate_ && *probe_bitrate < delay_based_bwe_->last_estimate() && + *probe_bitrate < estimate_->link_capacity_lower) { + probe_bitrate.reset(); + } NetworkControlUpdate update; bool recovered_from_overuse = false; diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.h b/modules/congestion_controller/goog_cc/goog_cc_network_control.h index 6710d89383..02ac49de5d 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.h +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.h @@ -87,6 +87,7 @@ class GoogCcNetworkController : public NetworkControllerInterface { FieldTrialFlag safe_reset_acknowledged_rate_; const bool use_downlink_delay_for_congestion_window_; const bool use_min_allocatable_as_lower_bound_; + const bool ignore_probes_lower_than_network_estimate_; const RateControlSettings rate_control_settings_; const std::unique_ptr probe_controller_;