Commit graph

28 commits

Author SHA1 Message Date
Sebastian Jansson
9de4ef4b24 Adds signed infinity to timestamps.
Negative infinity is useful in comparisons as it represents a value
guaranteed to be less than any other timestamp. This avoid using
Timestamp::ms(0) to represent such a value or having to use optional
for the special case of first time execution.

To avoid ambiguity, Timestamp::Infinity is renamed to PlusInfinity.

Bug: webrtc:9709
Change-Id: Ib2debff91036e94d1dc903ec0c6faae30febde4e
Reviewed-on: https://webrtc-review.googlesource.com/79440
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24556}
2018-09-04 17:14:05 +00:00
Sebastian Jansson
ed1f75ab6d Removes redundant starting rate.
Sine a starting rate field was added to the constraints struct. Having
it in the initial config separately is reduntant. To simplify the code,
the extra field is removed. This is a follow up on:
https://webrtc-review.googlesource.com/c/src/+/92624

Bug: webrtc:9586
Change-Id: I9b01b16b2fc4b8479e83b7e998308be2295e0325
Reviewed-on: https://webrtc-review.googlesource.com/96801
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24514}
2018-08-31 17:36:21 +00:00
Sebastian Jansson
206b77f7ad Adds start bitrate handling to task queue congestion controller.
This adds a start bitrate field to TargetRateConstraints since this is
required in VideoSendStreamTests. This also reduces the differences
between the old SendSideCongestionController and the new TaskQueue
based version.

Bug: webrtc:9586
Change-Id: I5d3d1414e9d30b51723c911a0bf2e96b876c04e5
Reviewed-on: https://webrtc-review.googlesource.com/92624
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24384}
2018-08-22 10:09:26 +00:00
Sebastian Jansson
13171bdba8 Adds debug printing for congestion controllers.
These are useful for plotting creating data files that can be used to
visualize and debug congestion controller behavior.

Bug: webrtc:9467
Change-Id: I75b03a309b4b7d562fefe82a828ae1e6a9f069c8
Reviewed-on: https://webrtc-review.googlesource.com/86126
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23822}
2018-07-03 17:00:24 +00:00
Sebastian Jansson
968b1dd0d7 Use field trial parser for BBR Experiment.
Bug: webrtc:8415
Change-Id: If6336b16fa55c6bd891252fc3b9c0bcce56e2fd1
Reviewed-on: https://webrtc-review.googlesource.com/83620
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23761}
2018-06-28 07:52:58 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Danil Chapovalov
0040b66ad3 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':

find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
2018-06-18 10:24:48 +00:00
Sebastian Jansson
5c43150cb0 Makes BBR congestion window more similar to QUIC.
This CL makes the congestion window parameters, initial window, minimum
window, and maximum window more similar to the values for the
implementation in QUIC.

It also contains minor behavioral changes to better match the Quic
implementation.

Bug: webrtc:8415
Change-Id: I26f4b35b6cbb00178ea47a4aee871b1b700c153b
Reviewed-on: https://webrtc-review.googlesource.com/83587
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23630}
2018-06-15 12:51:11 +00:00
Sebastian Jansson
3d8dbcb686 Adds loss rate filter in BBR controller.
Adds a simple loss rate filter to the BBR network congestion controller.
The loss rate is used to control error correction. Previously the value
was reported as zero which would disable error correction.

Bug: webrtc:8415
Change-Id: Icec8f25fcc9509432ea91eaec30b39a024f92b42
Reviewed-on: https://webrtc-review.googlesource.com/78263
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23467}
2018-05-31 11:10:07 +00:00
Sebastian Jansson
7645b18c04 Makes BBR more like the Quic implementation.
Bug: webrtc:8415
Change-Id: I2c21fbe88afec88726cbdd7c6e7626cccb07ce71
Reviewed-on: https://webrtc-review.googlesource.com/77762
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23420}
2018-05-28 17:13:09 +00:00
Sebastian Jansson
9c26a0fb00 Adds reporting of bandwidth estimation periods in BBR.
Bug: webrtc:8415
Change-Id: Ia1e8808d0b446653df6f2e3ae9548161bacdac6b
Reviewed-on: https://webrtc-review.googlesource.com/78262
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23380}
2018-05-24 11:16:26 +00:00
Sebastian Jansson
6c7da5940b Fixes off by one error in BBR random cycle initialization.
Bug: webrtc:8415
Change-Id: I2055b10c8a99a9bde4152a7b3f66c695ab329f68
Reviewed-on: https://webrtc-review.googlesource.com/78441
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23367}
2018-05-23 13:36:40 +00:00
Sebastian Jansson
ccd1048498 Apply constraints on pacing rate in BBR controller.
This avoid sending more padding than required for the current target
constraints.

Bug: webrt:8415
Change-Id: I3a668990f026414ab78f8406248cde18b81123cc
Reviewed-on: https://webrtc-review.googlesource.com/77763
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23364}
2018-05-23 12:48:20 +00:00
Sebastian Jansson
67535428b4 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}
2018-05-23 12:14:20 +00:00
Sebastian Jansson
dfce03af6e Allows injection of network controller factory into peer connection factory.
Bug: webrtc:9155
Change-Id: I0a17024042f154297aba20f5d2dc766feb27f3f7
Reviewed-on: https://webrtc-review.googlesource.com/73123
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23313}
2018-05-18 17:07:16 +00:00
Sebastian Jansson
a4e37a8f82 Adds ability to disable initial startup mode for BBR.
Bug: webrtc:8415
Change-Id: I882248999ae0125f2436dc0f9b32c4bdab1069b2
Reviewed-on: https://webrtc-review.googlesource.com/74590
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23135}
2018-05-07 08:15:44 +00:00
Sebastian Jansson
ec6e550a8f Removes usage of uninitialized units in network control code.
This removes places where the units types are implicitly left
uninitialized in network_types.h and adds rtc::Optional where needed.

Also removing the change indicator in the NetworkEstimate struct as it
is not used in practice.

Bug: webrtc:9155
Change-Id: I7e30e338effba96bd466ae91e380e6a8e90f66e1
Reviewed-on: https://webrtc-review.googlesource.com/73369
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23126}
2018-05-04 16:19:14 +00:00
Sebastian Jansson
91c237e374 Removing usage of uninitialized units in BBR code.
Bug: webrtc:9155
Change-Id: Ib10f0a5ac6155364e9b5748002bad72ff21c083e
Reviewed-on: https://webrtc-review.googlesource.com/73368
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23124}
2018-05-04 15:08:34 +00:00
Sebastian Jansson
693b446eca Wiring up probe_rtt_congestion_window_gain in BBR.
Bug: webrtc:8415
Change-Id: I2535522baf9020f48a283efcd410b3bb23493346
Reviewed-on: https://webrtc-review.googlesource.com/72004
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23008}
2018-04-24 17:01:20 +00:00
Sebastian Jansson
0c87fe85b8 Removes frequent log messages from BBR Controller.
Bug: webrtc:8415
Change-Id: Ibe8b42f8e7c1174ba82d371493af5421665c5d22
Reviewed-on: https://webrtc-review.googlesource.com/70241
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22884}
2018-04-16 16:08:08 +00:00
Sebastian Jansson
324865a206 Removes common header for network units.
The code using the units now depends on specific targets to make the
dependencies more clear

Bug: None
Change-Id: I3200d57a2974b6981db68f05d84391cbbb06e981
Reviewed-on: https://webrtc-review.googlesource.com/70181
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22882}
2018-04-16 14:51:18 +00:00
Sebastian Jansson
30bd4038cf Splits network units into separate headers.
This CL moves the network units files into a separate folder with a
separate BUILD file. It also splits the units into separate files.
This prepares for moving all or some of the units to somewhere that
can be accessed by more components.

Bug: None
Change-Id: I4ebbc19088b024ba920b0b3c64e5f57431f4f955
Reviewed-on: https://webrtc-review.googlesource.com/68660
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22861}
2018-04-13 13:24:28 +00:00
Sebastian Jansson
a73f8161aa Removing static initializers for BBR.
The static initializers caused issues with chromium build. This should
fix it for now.

Bug: None
Change-Id: I4592df0e2bd02980421bb6319c24e7b6983d2252
Reviewed-on: https://webrtc-review.googlesource.com/69020
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22807}
2018-04-10 14:45:45 +00:00
Sebastian Jansson
ae9057831f Removed observer from network controller interface.
Moving the responsibility for calling callbacks from implementations
of NetworkControllerInterface to SendSideCongestionController. This
decreases the coupling and makes the callbacks more explicit.

Bug: webrtc:8415
Change-Id: Ie75effbde01533106080bb6c40308b0c20064c45
Reviewed-on: https://webrtc-review.googlesource.com/66882
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22793}
2018-04-09 11:54:38 +00:00
Sebastian Jansson
2808ae99f8 Adds BBR network controller field trial.
This CL adds a field trial to enable the BBR congestion control method.
Since BBR is only implemented to handle per packet feedback,
SendSideCongestionController is modified to recreate network controllers
when the packet feedback availability changes and the BBR experiment is
enabled.

This also means that the periodic task used for process updates in the
network controllers has to recreated.

Bug: webrtc:8415
Change-Id: Ia24f7ad35336d2cc7a02bb3a445f1a84b8643475
Reviewed-on: https://webrtc-review.googlesource.com/61520
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22791}
2018-04-09 10:42:18 +00:00
Sebastian Jansson
ac6475e031 Reland "Added BBR network controller."
This is a reland of 8ac9bb4d52

Original change's description:
> Added BBR network controller.
> 
> BBR is a congestion control method that is initially developed for TCP.
> This CL adds an implementation of BBR ported from QUIC for use with
> WebRTC. An upcoming CL enables it via a field trial.
> 
> Bug: webrtc:8415
> Change-Id: Ie4261d2e43bafa15aa928a7cadcfec256107cdbc
> Reviewed-on: https://webrtc-review.googlesource.com/39788
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22647}

Bug: webrtc:8415
Change-Id: I090e4116d1f470acbd64af31520654e1bd8dfcda
Reviewed-on: https://webrtc-review.googlesource.com/65200
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22766}
2018-04-06 10:30:22 +00:00
Ying Wang
19c242d119 Revert "Added BBR network controller." due to downstream test failure.
This reverts commit 8ac9bb4d52.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Added BBR network controller.
> 
> BBR is a congestion control method that is initially developed for TCP.
> This CL adds an implementation of BBR ported from QUIC for use with
> WebRTC. An upcoming CL enables it via a field trial.
> 
> Bug: webrtc:8415
> Change-Id: Ie4261d2e43bafa15aa928a7cadcfec256107cdbc
> Reviewed-on: https://webrtc-review.googlesource.com/39788
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22647}

TBR=philipel@webrtc.org,srte@webrtc.org

Change-Id: Ife354d40bfc755f899cf485f3308575516206997
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8415
Reviewed-on: https://webrtc-review.googlesource.com/65180
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22651}
2018-03-28 13:54:18 +00:00
Sebastian Jansson
8ac9bb4d52 Added BBR network controller.
BBR is a congestion control method that is initially developed for TCP.
This CL adds an implementation of BBR ported from QUIC for use with
WebRTC. An upcoming CL enables it via a field trial.

Bug: webrtc:8415
Change-Id: Ie4261d2e43bafa15aa928a7cadcfec256107cdbc
Reviewed-on: https://webrtc-review.googlesource.com/39788
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22647}
2018-03-28 12:28:26 +00:00