From 9c26a0fb00594e3c129bb0a6a7fec5789e344816 Mon Sep 17 00:00:00 2001 From: Sebastian Jansson Date: Wed, 23 May 2018 20:40:52 +0200 Subject: [PATCH] Adds reporting of bandwidth estimation periods in BBR. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:8415 Change-Id: Ia1e8808d0b446653df6f2e3ae9548161bacdac6b Reviewed-on: https://webrtc-review.googlesource.com/78262 Reviewed-by: Björn Terelius Commit-Queue: Sebastian Jansson Cr-Commit-Position: refs/heads/master@{#23380} --- .../congestion_controller/bbr/bbr_network_controller.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/congestion_controller/bbr/bbr_network_controller.cc b/modules/congestion_controller/bbr/bbr_network_controller.cc index 7ca1d1450e..5067e9b835 100644 --- a/modules/congestion_controller/bbr/bbr_network_controller.cc +++ b/modules/congestion_controller/bbr/bbr_network_controller.cc @@ -225,9 +225,13 @@ NetworkControlUpdate BbrNetworkController::CreateRateUpdate(Timestamp at_time) { target_rate_msg.network_estimate.bandwidth = bandwidth; target_rate_msg.network_estimate.round_trip_time = rtt; - // TODO(srte): Fill in fields below with proper values. + // TODO(srte): Fill in field below with proper value. target_rate_msg.network_estimate.loss_rate_ratio = 0; - target_rate_msg.network_estimate.bwe_period = TimeDelta::Zero(); + // In in PROBE_BW, target bandwidth is expected to vary over the cycle period. + // In other modes the is no given period, therefore the same value as in + // PROBE_BW is used for consistency. + target_rate_msg.network_estimate.bwe_period = + rtt * static_cast(kGainCycleLength); target_rate_msg.target_rate = target_rate; target_rate_msg.at_time = at_time;