Commit graph

42 commits

Author SHA1 Message Date
Per K
819cfb0608 Add GoogCCScenario test of WebRTC-Bwe-ResetOnAdapterIdChange
The test tests that a route change does not cause BWE do drop unless the adapter is changed.

Bug: webrtc:42221538
Change-Id: I49be55172aff285c55d2564ec3389f3fc7c01d62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350820
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42347}
2024-05-20 10:30:18 +00:00
Per K
5566b91356 Reland "Replace usage of link_capacity_kbps with DataRate link_capacity"
This reverts commit ff2dd50fd8.

Reason for revert: Temporary fix for downstream breakage in patch 2

Original change's description:
> Revert "Replace usage of link_capacity_kbps with DataRate link_capacity"
>
> This reverts commit 6186c0226e.
>
> Reason for revert: Breaks downstream project.
>
> Original change's description:
> > Replace usage of link_capacity_kbps with DataRate link_capacity
> >
> > Replace usage of BuiltInNetworkBehaviorConfig.link_capacity_kbps in tests with  DataRate link_capacity.
> >
> > Bug: webrtc:14525
> > Change-Id: Id1c1b8d20eb2be5e9d1461704bb7c37c61c491f0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350300
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Per Kjellander <perkj@webrtc.org>
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42306}
>
> Bug: webrtc:14525
> Change-Id: I09ede3e89d065061cb4133bff96dbf242ff70832
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350621
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42309}

Bug: webrtc:14525
Change-Id: Ie35cd97a158d008a80ed007b27d2c6b1a9affff9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350541
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42320}
2024-05-16 10:39:10 +00:00
Mirko Bonadei
ff2dd50fd8 Revert "Replace usage of link_capacity_kbps with DataRate link_capacity"
This reverts commit 6186c0226e.

Reason for revert: Breaks downstream project.

Original change's description:
> Replace usage of link_capacity_kbps with DataRate link_capacity
>
> Replace usage of BuiltInNetworkBehaviorConfig.link_capacity_kbps in tests with  DataRate link_capacity.
>
> Bug: webrtc:14525
> Change-Id: Id1c1b8d20eb2be5e9d1461704bb7c37c61c491f0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350300
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42306}

Bug: webrtc:14525
Change-Id: I09ede3e89d065061cb4133bff96dbf242ff70832
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350621
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42309}
2024-05-15 11:09:33 +00:00
Per K
6186c0226e Replace usage of link_capacity_kbps with DataRate link_capacity
Replace usage of BuiltInNetworkBehaviorConfig.link_capacity_kbps in tests with  DataRate link_capacity.

Bug: webrtc:14525
Change-Id: Id1c1b8d20eb2be5e9d1461704bb7c37c61c491f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350300
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42306}
2024-05-15 08:44:20 +00:00
Per Kjellander
6866da1822 Revert "Add more accurate support for changing capacity in SimulatedNetwork"
This reverts commit 51a70c0d6f.

Reason for revert: Breaks downstream project test.

Original change's description:
> Add more accurate support for changing capacity in SimulatedNetwork
>
> NetworkBehaviorInterface::RegisterDeliveryTimeChangedCallback
> adds support for a network behaviour to reschedule next time DequeueDeliverablePackets should be invoked.
>
> SimulatedNetwork::SetConfig(const BuiltInNetworkBehaviorConfig& config,
>                             Timestamp config_update_time)
> adds possibility to change the configuration at config_update_time. Delivery time of a packet currently in the narrow section, will depend on the link capacity before and after the update.
>
> Bug: webrtc:14525
> Change-Id: I271251992d05c68f9160bb81811ea8f2efe9c921
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349461
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42243}

Bug: webrtc:14525
Change-Id: Iace13b1b4ef21005c9668ff27f6d1ec8f3212baf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349923
Owners-Override: Per Kjellander <perkj@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42245}
2024-05-07 11:02:33 +00:00
Per K
51a70c0d6f Add more accurate support for changing capacity in SimulatedNetwork
NetworkBehaviorInterface::RegisterDeliveryTimeChangedCallback
adds support for a network behaviour to reschedule next time DequeueDeliverablePackets should be invoked.

SimulatedNetwork::SetConfig(const BuiltInNetworkBehaviorConfig& config,
                            Timestamp config_update_time)
adds possibility to change the configuration at config_update_time. Delivery time of a packet currently in the narrow section, will depend on the link capacity before and after the update.

Bug: webrtc:14525
Change-Id: I271251992d05c68f9160bb81811ea8f2efe9c921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349461
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42243}
2024-05-07 08:53:16 +00:00
Harald Alvestrand
d43af9172b Remove internal overrides using old SendRtp and SendRtcp interfaces.
This CL takes away all usages except for Android code.

Low-Coverage-Reason: Refactoring old code
Bug: webrtc:15410
Change-Id: I66bed6a4a2787b4177a82e599b48623ca67cd235
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315940
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40554}
2023-08-15 13:20:21 +00:00
Evan Shrubsole
02bdf66f95 Reland "Launch WebRTC-SendPacketsOnWorkerThread""
This reverts commit a09b30dd8a.

Reland OK: Internal test fixed.

Bug: webrtc:14502, b/254640777
Change-Id: I4838111169b10099a8b14e18170307b342e45033
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295864
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39460}
2023-03-02 17:11:03 +00:00
Andrey Logvin
a09b30dd8a Revert "Launch WebRTC-SendPacketsOnWorkerThread"
This reverts commit 8d33105015.

Reason for revert: Speculative revert, may have caused breakage in post submit tests. E.g. https://ci.chromium.org/p/webrtc/builders/ci/Linux32%20Debug/32343 (waterfall https://ci.chromium.org/p/webrtc/g/ci/console?limit=200)

Original change's description:
> Launch WebRTC-SendPacketsOnWorkerThread
>
> Bug: webrtc:14502, b/254640777
> Change-Id: I61269443b5ce87ba0c5354f863c731292c86dbce
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293581
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39425}

Bug: webrtc:14502, b/254640777
Change-Id: Iec5d373fb7a73bc07d8cc4af4ca03a0f60331eda
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295662
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Andrey Logvin <landrey@webrtc.org>
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39429}
2023-03-01 09:14:32 +00:00
Evan Shrubsole
8d33105015 Launch WebRTC-SendPacketsOnWorkerThread
Bug: webrtc:14502, b/254640777
Change-Id: I61269443b5ce87ba0c5354f863c731292c86dbce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293581
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39425}
2023-02-28 18:03:59 +00:00
Mirko Bonadei
399a2b5ef6 Remove CoDel from webrtc::SimulatedNetwork.
This is unused at the moment and webrtc::SimulatedNetwork is going
through a refactoring, to keep things simple and well tested this CL
removes CoDel but nothing blocks us from re-implementing it when needed.

No-Try: True
Bug: webrtc:14426
Change-Id: Ie7d40d20a66d3939fc7d3251c47e4f13f3869a27
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274407
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38032}
2022-09-08 06:51:05 +00:00
Markus Handell
a5a4be1118 Partly migrate test/ to webrtc::Mutex.
This change migrates test/, except for subdirs
  - test/time_controller
  - test/pc/e2e

Bug: webrtc:11567
Change-Id: Ib6f7c062f1c66caf7083fb4ec60727d66299dbeb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/178819
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31675}
2020-07-08 14:31:00 +00:00
Jonas Oreland
71fda3613c Extend NetworkRoute with more info about local/remote endpoints
This patch extends the NetworkRoute struct with more information
about local/remote endpoints. It adds
- adapter type
- adapter id
- relay

(previously it was "only" network_id)

The patch leaves the {local/remote}_network_id fields
around and populated since downstream projects depend
on them. They will be removed once they have migrated.

OWNER: srte@ call/ test/
OWNER: asapersson@ video/
OWNER: hta@ p2p/ pc/ rtc_base/

BUG: webrtc:11434
Change-Id: I9bcec385b40d707db385fef40b2c7a315dd35dd0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170628
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30848}
2020-03-20 16:55:38 +00:00
Sebastian Jansson
f52d3ed084 Adds transport overhead to route changes in scenario tests.
Bug: webrtc:9510
Change-Id: Iadc67420c9db085f4ae6325a1861fd78d9faa5a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169362
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30662}
2020-03-02 15:32:19 +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
Yves Gerey
2257c087b1 [Cleanup/Optim] Pass IPAddress by const reference.
The IPAddress class (32 bytes) was copied for each invocation.
This CL also saves some bytes in generated binary.

Bug: webrtc:9855
Change-Id: I40f2fe8570ee30d1d2251fddd56131ca4c3e7155
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/164521
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#30147}
2020-01-03 18:42:32 +00:00
Sebastian Jansson
24c678fd41 Adds test for loss based controller under cross traffic induced loss.
Bug: webrtc:9883
Change-Id: I85a83dd15afe523e0ba5b3a723979317f0b98ab7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156501
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29465}
2019-10-14 13:59:11 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Sebastian Jansson
b64ad0e72c Using Clock::CurrentTime() where non-test behavior is unchanged.
This CL replaces all uses of Timestamp::us(Clock::TimeInMicroseconds())
with Clock::CurrentTime() which should be a no-op apart from slight
changes in checks.

Additionally instances of Timestamp::ms(Clock::TimeInMilliseconds()) in
test code is replaced. This slightly changes the behavior since the
timestamp will get increased resolution.

Timestamp::ms(Clock::TimeInMilliseconds()) in non-test code is untouched
to avoid changing behavior of production code.

Bug: webrtc:9883
Change-Id: I8047f4cb2ca735f44f11d32f9367aa3eb376ec04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142803
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28321}
2019-06-19 09:18:21 +00:00
Sebastian Jansson
a4c22b9662 Using NetworkEmulationManager in Scenario tests.
Bug: webrtc:9510
Change-Id: Ib619526269c58f0c46c0c1f01ba6c0efa5f79ba5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132781
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27635}
2019-04-16 06:24:26 +00:00
Sebastian Jansson
ef86d1413e Refactor of SimulationNode.
This prepares for using network emulation manager in Scenario tests.

Bug: webrtc:9510
Change-Id: I6ae1b21790d0bcd2b01a3b293231d0859afc1ac8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132719
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27623}
2019-04-15 14:11:00 +00:00
Artem Titov
de83d0c81a Fix params comments in network emulation layer and its usage in scenario framework
Bug: webrtc:10138
Change-Id: I9273410375cf4914abffa69f7443e13d52e77675
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130222
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27397}
2019-04-01 14:51:49 +00:00
Sebastian Jansson
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
Artem Titov
4cd433ed5f Switch routing from dest endpoint id to dest ip in network emulation layer
Bug: webrtc:10138
Change-Id: I8659777820ec7244c1435d71504b0c01fb438192
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130103
Reviewed-by: Yves Gerey <yvesg@google.com>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27386}
2019-04-01 10:04:41 +00:00
Sebastian Jansson
2b08e3188e Adds CoDel implementation to network simulation.
Adds an implementation of the CoDel active queue management algorithm
to the network simulation. It is loosely based on CoDel pseudocode
from ACMQueue: https://queue.acm.org/appendices/codel.html

Bug: webrtc:9510
Change-Id: Ice485be35a01dafa6169d697b51b5c1b33a49ba6
Reviewed-on: https://webrtc-review.googlesource.com/c/123581
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26834}
2019-02-25 09:54:03 +00:00
Sebastian Jansson
aa01f27667 Removes all const Clock*.
This prepares for making the Clock interface fully mutable.

Calls to the time functions in Clock can have side effects in some
circumstances. It's also questionable if it's a good idea to allow
repeated calls to a const method return different values without
any changed to the class instance.

Bug: webrtc:9883
Change-Id: I96fb9230705f7c80a4c0702132fd9dc73899fc5e
Reviewed-on: https://webrtc-review.googlesource.com/c/120347
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26467}
2019-01-30 13:03:37 +00:00
Sebastian Jansson
8c8feb9d2b Moves packet overhead from network nodes to simulation.
This simplifies the design by making simulated network more self
sufficient. It also prepares for removing network node specific
configuration (The behavior implementation should be responsible
for handling any configuration.)

Bug: webrtc:9510
Change-Id: I218d70c0359774d9891178fbd8b1bbc729cbad92
Reviewed-on: https://webrtc-review.googlesource.com/c/120346
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26450}
2019-01-29 16:55:04 +00:00
Steve Anton
40d55331d7 Include absl/memory/memory.h if absl::make_unique is used
Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Iaf4533d2ce0e80b351a8a664ef8cf7ba0e5ec583
Reviewed-on: https://webrtc-review.googlesource.com/c/115746
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@google.com>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26168}
2019-01-08 20:08:32 +00:00
Artem Titov
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
Artem Titov
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
Sebastian Jansson
f65309cd47 Removes return value and Try prefix from TryDeliverPacket.
The return value is not used. This change prepares for future
refactoring by removing the requirement that TryDeliverPacket must be
synchronous. Also renaming to DeliverPacket as we no longer need to
indicate the meaning of the return value.

Bug: webrtc:9510
Change-Id: I78536434b198fa7bf4df88b10d6add23684767f1
Reviewed-on: https://webrtc-review.googlesource.com/c/115181
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26066}
2018-12-20 10:04:17 +00:00
Sebastian Jansson
f3ef6cd863 Using more accurate receive time calculation in scenario tests.
Some tests had to be updated due to this change.

Bug: webrtc:9510
Change-Id: I79c4c0166d8ba5e8190a607d5d35b67dc30a3c14
Reviewed-on: https://webrtc-review.googlesource.com/c/113522
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25952}
2018-12-10 15:54:33 +00:00
Sebastian Jansson
800e121dca Adds support to change transport routes in Scenario tests.
This CL makes it possible to change transport routes while running
a scenario based test.

To make this possible in a consistent manner, the scenario test
framework is modified to only allow shared transport for all streams
between two CallClients. This is what typically is done in practice and
it is quite complex to even reason about the implications of using
mixed transports for a single call.

Bug: webrtc:9718
Change-Id: Ib836928feed98aa2bbbe0295e158157a6518348b
Reviewed-on: https://webrtc-review.googlesource.com/c/107200
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25287}
2018-10-22 11:14:37 +00:00
Sebastian Jansson
0378997db3 Adds flags indicating presence in allocation and feedback per packet.
This CL adds flags to the PacketOptions and PacktInfo struct that are
intended to be used to indicate if the packet belongs to a media stream
that is part of bitrate allocation as well as if it is included in
transport wide packet feedback.

This is part of a series of CLs that allows GoogCC to track sent bitrate
that is included in bitrate allocation but without transport feedback.

Bug: webrtc:9796
Change-Id: Icdf3e1e13d3f119574ee1b2c574f2d3329a7e303
Reviewed-on: https://webrtc-review.googlesource.com/c/104920
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25069}
2018-10-09 18:24:38 +00:00
Yves Gerey
2e00abc98e Reland "[cleanup] Remove useless includes."
Reason for reland: Downstream project fixed.

Original change's description:

> [cleanup] Remove useless includes.
>
> Manual cleanup guided by include-what-you-use diagnostic.
>
> Bug: webrtc:8311
> Change-Id: I00be03392cc7ee005101427ea7dc701621ccea68
> Reviewed-on: https://webrtc-review.googlesource.com/c/103320
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25013}

Bug: webrtc:8311
Change-Id: Id6ec4aeb798886a90ace640a190eaf16497ba31b
Reviewed-on: https://webrtc-review.googlesource.com/c/104120
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25034}
2018-10-08 07:44:19 +00:00
Oleh Prypin
96a0f61917 Revert "[cleanup] Remove useless includes."
This reverts commit be8b5348c7.

Reason for revert: Breaks downstream project

Original change's description:
> [cleanup] Remove useless includes.
> 
> Manual cleanup guided by include-what-you-use diagnostic.
> 
> Bug: webrtc:8311
> Change-Id: I00be03392cc7ee005101427ea7dc701621ccea68
> Reviewed-on: https://webrtc-review.googlesource.com/c/103320
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25013}

TBR=phoglund@google.com,phoglund@webrtc.org,yvesg@webrtc.org

Change-Id: I7a6e1cdfef685173b76f234ad598083043dcd9a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8311
Reviewed-on: https://webrtc-review.googlesource.com/c/104022
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25015}
2018-10-05 13:13:45 +00:00
Yves Gerey
be8b5348c7 [cleanup] Remove useless includes.
Manual cleanup guided by include-what-you-use diagnostic.

Bug: webrtc:8311
Change-Id: I00be03392cc7ee005101427ea7dc701621ccea68
Reviewed-on: https://webrtc-review.googlesource.com/c/103320
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25013}
2018-10-05 11:51:06 +00:00
Artem Titov
8ea1e9def1 Switch webrtc from deprecated usages of NetworkSimulationInterface
Bug: webrtc:9630
Change-Id: I42222261676b0c260c1aab81523a23988d3cd1c1
Reviewed-on: https://webrtc-review.googlesource.com/c/103780
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25011}
2018-10-05 11:01:42 +00:00
Sebastian Jansson
156d11ddd9 Adds packet_size to rtc::SentPacket in testing code.
Bug: webrtc:9796
Change-Id: Id67bb02858164dba696474b1b60ebfa1597a2577
Reviewed-on: https://webrtc-review.googlesource.com/102685
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24901}
2018-09-29 22:06:07 +00:00
Sebastian Jansson
98b07e9180 Adds scenario test framework.
Bug: webrtc:9510
Change-Id: I387aab4211f520a1c54832f82032ee724479e89e
Reviewed-on: https://webrtc-review.googlesource.com/89342
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24864}
2018-09-27 12:31:33 +00:00