Commit graph

21 commits

Author SHA1 Message Date
Florent Castelli
c3e6e3a3e8 Remove dependency on rtc_base_approved from most targets
Bug: webrtc:9838
Change-Id: Ibd0199803597eff48ca139a5cecdc3209c62c5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259873
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36643}
2022-04-25 12:15:30 +00:00
Florent Castelli
ed4aadc0a2 Move copy_on_write_buffer out of rtc_base_approved
Bug: webrtc:9838
Change-Id: Ib9a9cd3bc868e716315594c436df7e2cce0d9a5a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259311
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36636}
2022-04-24 09:51:50 +00:00
Artem Titov
0e61fdd27c Use backticks not vertical bars to denote variables in comments for /api
Bug: webrtc:12338
Change-Id: Ib97b2c3d64dbd895f261ffa76a2e885bd934a87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34554}
2021-07-26 18:27:34 +00:00
Niels Möller
376cf384ac Replace RecursiveCriticalSection with Mutex in EmulatedEndpointImpl
Bug: webrtc:11567
Change-Id: Ie9a1f123e7d2858c03414336875d8c537be67702
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208403
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33348}
2021-02-26 09:58:49 +00:00
Artem Titov
3d37e06fed Introduce default routes for network emulation
Change-Id: If9bc941d54844e0f22147fb13e148ced1bc49c71
Bug: b/180750880
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208227
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33310}
2021-02-22 11:26:53 +00:00
Mirko Bonadei
e5f4c6b8d2 Reland "Refactor rtc_base build targets."
This is a reland of 69241a93fb

Fix: The problem was related to NO_MAIN_THREAD_WRAPPING, which
affects https://source.chromium.org/chromium/chromium/src/+/master:third_party/webrtc/rtc_base/thread.cc;l=257-263;drc=7acc2d9fe3a6e3c4d8881d2bdfc9b8968a724cd5.
The original CL didn't attach the definition of the macro
NO_MAIN_THREAD_WRAPPING when building for Chromium (which doesn't have
to be related to //rtc_base anymore but to //rtc_base:threading).

Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
>   break a circular dependency (is has been extracted from
>   //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
>   break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}

Bug: webrtc:9987
Change-Id: I7cdf49d2aac8357f1f50f90010bf2c2f62fa19f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/202021
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33001}
2021-01-15 17:00:05 +00:00
Andrey Logvin
f9ee0e08ec Add cross trafic emulation api
Bug: webrtc:12344
Change-Id: I958dc4deda4af4576818600c31aecdf48285172f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/200981
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32989}
2021-01-15 07:38:17 +00:00
Mirko Bonadei
7acc2d9fe3 Revert "Refactor rtc_base build targets."
This reverts commit 69241a93fb.

Reason for revert: Breaks WebRTC roll into Chromium.

Original change's description:
> Refactor rtc_base build targets.
>
> The "//rtc_base:rtc_base" build target has historically been one of the
> biggest targets in the WebRTC build. Big targets are the main source of
> circular dependencies and non-API types leakage.
>
> This CL is a step forward into splitting "//rtc_base:rtc_base" into
> smaller targets (as originally started in 2018).
>
> The only non-automated changes are (like re-wiring the build system):
> * The creation of //rtc_base/async_resolver.{h,cc} which allows to
>   break a circular dependency (is has been extracted from
>   //rtc_base/net_helpers.{h,cc}).
> * The creation of //rtc_base/internal/default_socket_server.{h,cc} to
>   break another circular dependency.
>
> Bug: webrtc:9987
> Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32941}

TBR=mbonadei@webrtc.org,hta@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

No-Try: True
Bug: webrtc:9987
Change-Id: I1e36ad64cc60092f38d6886153a94f1a58339256
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/201840
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32986}
2021-01-14 21:27:38 +00:00
Mirko Bonadei
69241a93fb Refactor rtc_base build targets.
The "//rtc_base:rtc_base" build target has historically been one of the
biggest targets in the WebRTC build. Big targets are the main source of
circular dependencies and non-API types leakage.

This CL is a step forward into splitting "//rtc_base:rtc_base" into
smaller targets (as originally started in 2018).

The only non-automated changes are (like re-wiring the build system):
* The creation of //rtc_base/async_resolver.{h,cc} which allows to
  break a circular dependency (is has been extracted from
  //rtc_base/net_helpers.{h,cc}).
* The creation of //rtc_base/internal/default_socket_server.{h,cc} to
  break another circular dependency.

Bug: webrtc:9987
Change-Id: I0c8f5e7efe2c8fd8e6bffa0d6dd2dd494cf3df02
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196903
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32941}
2021-01-11 18:32:30 +00:00
Artem Titov
cbe6e8a258 Introduce debug network stats
Bug: webrtc:11959
Change-Id: I29e94cf1cdc9aee2bbe4396aa14a759c1a9ae560
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/184600
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32170}
2020-09-23 09:40:25 +00:00
Artem Titov
5501cef0a7 Follow up on https://webrtc-review.googlesource.com/c/src/+/180360
Bug: webrtc:11756
Change-Id: I2f65713181598a5af831bb6ce71c32cf7c0f4b90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180882
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32056}
2020-09-08 10:04:59 +00:00
Artem Titov
9dcab80617 Remove stat API from EmulatedEndpoint.
stats() method on EmulatedEndpoint has to be called from network
emulation internal task queue and user has no access to that task queue,
so user can't call this method. Because of that remove it from public
API and keep it only on implementation.

Bug: webrtc:11756
Change-Id: I2fb7256abe94d6900965512f90c6a53a0708a7b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180880
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31867}
2020-08-06 12:53:33 +00:00
Artem Titov
14b46a77b2 Provide per destination statistic for network outgoing stats
Network emulation layer provides per source split for incoming stats for
endpoint. Do the same for outgoing stats per destination.

Bug: webrtc:11756
Change-Id: I2369ae8906546c27133273b1be17ce74c253c6e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180500
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31820}
2020-07-31 11:52:13 +00:00
Artem Titov
3e0b65d324 Replace network layer stats struct with interface
It is a follow up CL to
https://webrtc-review.googlesource.com/c/src/+/179368.
Now when network stats became more complex structure it's better to hide
its implementation details and provide an interface for read-only
access.

Bug: webrtc:11756
Change-Id: I1980ef938f8de0c6aa90092d1dc90a14a82e0ee1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179840
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31784}
2020-07-23 10:07:45 +00:00
Artem Titov
1062cfee8d Add list of local_addresses for network stats object
local_addresses is a list of IPs that were used to send data, which was
used during stats calculation.

Bug: webrtc:11756
Change-Id: Ie6307eaa69c73ebe9f69e44503752151be9e9ef6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179841
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31774}
2020-07-21 16:17:02 +00:00
Artem Titov
c1a0737855 Add per source network statistics
Add ability to obtain incoming data network statistic splitted by data
source IP address.

Bug: webrtc:11756
Change-Id: I023c99f6bd19363a52a358dba52d25cd507097ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179368
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31770}
2020-07-21 09:03:34 +00:00
Mirko Bonadei
2dcf348011 Use absl_deps in order to preapre to the Abseil component build release.
Bug: webrtc:1046390
Change-Id: Ia35545599de23b1a2c2d8be2d53469af7ac16f1d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176502
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31463}
2020-06-08 12:59:40 +00:00
Sebastian Jansson
db5d7e470f Cleanup: Use common IP overhead definitions in test and prod code
This avoid duplication. As part of this moving the overhead calculation
to the IP address class so it's easier to find and more natural to use.

Bug: webrtc:9883
Change-Id: If4d865f445bc1a302572896932966ce30294e339
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169445
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30657}
2020-03-02 11:36:58 +00:00
Sebastian Jansson
77bd385b55 Using EmulatedEndpoint in Scenario tests.
Bug: webrtc:9883
Change-Id: I7d1dc9d8efbdddc14e1fbe08d7b6a71c4bbe24ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166341
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30300}
2020-01-17 12:50:20 +00:00
Sebastian Jansson
c9f42ad909 Simplifies transport overhead mechanism in Scenario test framework.
This changes the behavior for adding virtual transport overhead so it
doesn't change the size of the actual payload buffer, only the
calculated packet size.

Bug: webrtc:9883
Change-Id: I6e24598378c4dd6a591d36ca3b162e933ff4ef7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164523
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30298}
2020-01-17 11:30:02 +00:00
Sebastian Jansson
cec2433c47 Exposing more features in the network emulation manager API.
Bug: webrtc:9883
Change-Id: I2a687b46e3374db0dd08b0c02dfea1482e6fb89f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161229
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30024}
2019-12-06 08:47:19 +00:00