Commit Graph

20 Commits

Author SHA1 Message Date
f4c7ab1bb2 in test/scenario pass TaskQueueFactory explicitly
instead of relying on factories that use GlobalTaskQueueFactory

Bug: webrtc:10284
Change-Id: Iafece5e83ccfd33499e9a473ea7e2e99d5c824c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139522
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28150}
2019-06-04 09:21:17 +00:00
3525f86c42 Adds feedback generator.
This is a useful tool to use for unittests of code that uses
TransportFeedback as input.

Bug: webrtc:10498
Change-Id: I171b22841eb9e16a5d5b785ff45ae9df5a6ccd7f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137423
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27975}
2019-05-17 16:14:32 +00:00
a768345596 Reduce flakiness of NetworkEmulationManagerTest.ThroughputStats
Bug: webrtc:10138, webrtc:10553
Change-Id: Id7027b94b3a6c072ee48c1291b638f2dc8b8b095
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133164
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27949}
2019-05-15 11:32:46 +00:00
f6e6435ab8 Cleanup in NetworkEmulationManager
This prepares for an upcoming CL removing cross traffic processing
when it's not used.

Bug: webrtc:10365
Change-Id: I7f1f3998f7f38c2a627b888c3db6b0c459d8271d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133485
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27682}
2019-04-18 08:25:50 +00:00
b4b53bd8cc Revert "Only process cross traffic simulation if added."
This reverts commit 491d29448e4a0f501f1ea115b218ed5250fbd3dc.

Reason for revert: Breaks internal iOS waterfall

Original change's description:
> Only process cross traffic simulation if added.
> 
> This avoids extra processing overhead when there's no cross traffic
> simulation active. To allow the use of SendTask, GlobalTimeController
> is adjusted so it always overrides yield behavior.
> 
> Also adding sequence checkers to protect against races on
> read access.
> 
> Bug: webrtc:10365
> Change-Id: I55c6ceb22f36ec19a4fca48cff500905192d1a16
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133167
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27658}

TBR=nisse@webrtc.org,srte@webrtc.org,titovartem@webrtc.org

Change-Id: I3b176b0ec202a047c4436e3c2136e8170faea41e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10365
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133482
Reviewed-by: Artem Titarenko <artit@google.com>
Commit-Queue: Artem Titarenko <artit@google.com>
Cr-Commit-Position: refs/heads/master@{#27669}
2019-04-17 15:39:10 +00:00
491d29448e Only process cross traffic simulation if added.
This avoids extra processing overhead when there's no cross traffic
simulation active. To allow the use of SendTask, GlobalTimeController
is adjusted so it always overrides yield behavior.

Also adding sequence checkers to protect against races on
read access.

Bug: webrtc:10365
Change-Id: I55c6ceb22f36ec19a4fca48cff500905192d1a16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133167
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27658}
2019-04-17 10:59:06 +00:00
ff39312958 Add ability to have multiple connected remote endpoints
Bug: webrtc:10138
Change-Id: Ic305c2f247588d75b6ced17052ba12d937d1a056
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128864
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27460}
2019-04-05 10:27:14 +00:00
4124dab7f3 Processing emulated network on task queue.
The has some benefits:
* We no longer need locks to protect the emulated network node state.
* We only process when there are packets in flight.
* It makes Scenario more similar to network emulation manager.

Bug: webrtc:10365
Change-Id: I8bd1ad1edfb54b047e8109dabd9846ae451cef17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127548
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27393}
2019-04-01 13:52:49 +00:00
e5cc85b5c5 Introduce dynamic endpoints
Bug: webrtc:10138
Change-Id: I7f6922adb93680cada6bea014539fc3089735834
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128480
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27336}
2019-03-28 12:27:41 +00:00
94b57c044e Cleanup BUILD.gn files from imports like foo:foo
Repalce all occurrences of foo:foo in deps with just foo in BUILD.gn
files.

Done with Sublime regex replace.
Find: \b([-a-zA-Z0-9_]+):+\1\b
In: *.gn
Replace with: \1

Bug: None
Change-Id: I40aba1b14face687a595b852ffe443cb20197611
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127899
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27225}
2019-03-21 13:05:28 +00:00
533a9fec55 Clean BUILD.gn files: remove extra :memory
Use //third_party/abseil-cpp/absl/memory instead of
//third_party/abseil-cpp/absl/memory:memory in BUILD.gn files.

Bug: None
Change-Id: I47c915f0847b102b37c5b38009c91b315cd3a1b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128615
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27222}
2019-03-21 12:09:50 +00:00
982b576bca Avoid using GlobalTaskQueueFactory in NetworkEmulationManager
by using TaskQueueForTest that use Default task queue factory directly

Bug: webrtc:10284
Change-Id: I775911c72851e850a9364714008397cf4d3ab484
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128613
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27217}
2019-03-21 10:13:40 +00:00
7bf8c7f8cc Add public API for NetworkEmulationManager
Bug: webrtc:10138
Change-Id: Ib5f8e95761813bd117a5e29adbc6822a5c6c73bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126122
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27146}
2019-03-15 14:50:59 +00:00
208634763a Move creation of rtc::NetworkManager into network emulation layer
Bug: webrtc:10138
Change-Id: I64271fab46a8dccb09f255eb14a4404b0bccdea3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127285
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27097}
2019-03-13 12:52:49 +00:00
07a4f2b267 Merge rtc_task_queue(_api|_impl)? build targets into one
Ignore rtc_link_task_queue_impl flag,
instead use build_with_chromium for custom chromium implementation injection

This changes TaskQueue implementation used in webrtc fuzzers in chromium:
from own webrtc implementation to chromium's.

Bug: webrtc:10191
Change-Id: I63be28b680ae8ea8ee1dbf0c699263c392ce29d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125196
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26977}
2019-03-05 20:13:38 +00:00
fc52b912a3 Implicitly suppress //build/config/clang:find_bad_constructs.
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).

The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.

Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.

[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}
2019-03-01 10:18:17 +00:00
d3666b2d98 Introduce cross traffic for emulated network layer.
This CL contains cross traffic and is a second part of landing
CL https://webrtc-review.googlesource.com/c/src/+/116663

Bug: webrtc:10138
Change-Id: Ibe0614f80127e93ee8a92b85685cacbf079dee21
Reviewed-on: https://webrtc-review.googlesource.com/c/120925
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26649}
2019-02-12 13:18:33 +00:00
0774bd9583 Introduce network layer.
This CL contains network emulation layer and is a first part of landing
CL https://webrtc-review.googlesource.com/c/src/+/116663

Bug: webrtc:10138
Change-Id: If664b21e9df847aef8144d622d08fc7e9f6608da
Reviewed-on: https://webrtc-review.googlesource.com/c/120406
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26470}
2019-01-30 15:45:10 +00:00
37d18485dd Extract NetworkNode abstraction.
Extract NetworkNode abstraction and introduce cleaner structure for emulation based on abstract NetworkBehaviorInterface.

Bug: webrtc:10138
Change-Id: I89cdae2f3792da34ce169f14592c53515c8ba3ac
Reviewed-on: https://webrtc-review.googlesource.com/c/116181
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26159}
2019-01-08 15:14:18 +00:00
40f511540b Extract NetworkReceiverInterface and introduce EmulatedIpPacket
It is a step in the big refactoring to introduce new network emulation
layer for peer connection level e2e test, which will be based on system
sockets level injection.

Bug: webrtc:10138
Change-Id: Ie3854d22aa3eec289617bc432026ea670646556a
Reviewed-on: https://webrtc-review.googlesource.com/c/115943
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26137}
2019-01-04 15:19:13 +00:00