From 802dd5bdbd97d880761059c7362c9e843211e32d Mon Sep 17 00:00:00 2001 From: George Panayotov Date: Thu, 21 Mar 2024 04:48:25 +0000 Subject: [PATCH] Revert "Stop exponential probing if 2xmax allocated bitrate lower than BWE." This reverts commit 5a4ce031019bce349ad65e76aa5da6d0f8e5989e. Reason for revert: Breaks tests in downstream project. Original change's description: > Stop exponential probing if 2xmax allocated bitrate lower than BWE. > > Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease. > > Bug: webrtc:14928 > Change-Id: Id8e314740c2403d3b801d28f634dbc718f77c16e > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343384 > Reviewed-by: Diep Bui > Commit-Queue: Per Kjellander > Cr-Commit-Position: refs/heads/main@{#41929} Bug: webrtc:14928 Change-Id: I0d48b37bfb8684fd490f5685e510b438a83254b9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343900 Commit-Queue: Ying Wang Bot-Commit: rubber-stamper@appspot.gserviceaccount.com Reviewed-by: Ying Wang Cr-Commit-Position: refs/heads/main@{#41958} --- .../goog_cc/probe_controller.cc | 8 +----- .../goog_cc/probe_controller_unittest.cc | 26 ------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/modules/congestion_controller/goog_cc/probe_controller.cc b/modules/congestion_controller/goog_cc/probe_controller.cc index 6c3667b9df..31727051a8 100644 --- a/modules/congestion_controller/goog_cc/probe_controller.cc +++ b/modules/congestion_controller/goog_cc/probe_controller.cc @@ -294,13 +294,7 @@ std::vector ProbeController::SetEstimatedBitrate( if (state_ == State::kWaitingForProbingResult) { // Continue probing if probing results indicate channel has greater - // capacity unless we already reached the needed bitrate. - if (bitrate > max_bitrate_ || - (!max_total_allocated_bitrate_.IsZero() && - bitrate > 2 * max_total_allocated_bitrate_)) { - // No need to continue probing. - min_bitrate_to_probe_further_ = DataRate::PlusInfinity(); - } + // capacity. DataRate network_state_estimate_probe_further_limit = config_.network_state_estimate_probing_interval->IsFinite() && network_estimate_ diff --git a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc index fb5fc2df7f..6e34a2962d 100644 --- a/modules/congestion_controller/goog_cc/probe_controller_unittest.cc +++ b/modules/congestion_controller/goog_cc/probe_controller_unittest.cc @@ -23,10 +23,8 @@ #include "test/gmock.h" #include "test/gtest.h" -using ::testing::Gt; using ::testing::IsEmpty; using ::testing::NiceMock; -using ::testing::SizeIs; namespace webrtc { namespace test { @@ -327,30 +325,6 @@ TEST(ProbeControllerTest, TestExponentialProbing) { EXPECT_EQ(probes[0].target_data_rate.bps(), 2 * 1800); } -TEST(ProbeControllerTest, ExponentialProbingStopIfMaxAllocatedBitrateLow) { - ProbeControllerFixture fixture; - std::unique_ptr probe_controller = - fixture.CreateController(); - ASSERT_THAT( - probe_controller->OnNetworkAvailability({.network_available = true}), - IsEmpty()); - auto probes = probe_controller->SetBitrates( - kMinBitrate, kStartBitrate, kMaxBitrate, fixture.CurrentTime()); - ASSERT_THAT(probes, SizeIs(Gt(0))); - - // Repeated probe normally is sent when estimated bitrate climbs above - // 0.7 * 6 * kStartBitrate = 1260. But since allocated bitrate i slow, expect - // exponential probing to stop. - probes = probe_controller->OnMaxTotalAllocatedBitrate(kStartBitrate, - fixture.CurrentTime()); - EXPECT_THAT(probes, IsEmpty()); - - probes = probe_controller->SetEstimatedBitrate( - DataRate::BitsPerSec(1800), BandwidthLimitedCause::kDelayBasedLimited, - fixture.CurrentTime()); - EXPECT_THAT(probes, IsEmpty()); -} - TEST(ProbeControllerTest, TestExponentialProbingTimeout) { ProbeControllerFixture fixture; std::unique_ptr probe_controller =