Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Issue 1668073002: Add network cost as part of the connection comparison. (Closed)

Created:
4 years, 10 months ago by honghaiz3
Modified:
4 years, 10 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add network cost as part of the connection ranking. For now, the network cost is purely based on the network type (cellular has cost 0xFFFF and everything else has cost 0). Add cost to the candidate signaling and the stun request signaling (which is needed for peer reflexive candidates). BUG=webrtc:4325 Committed: https://crrev.com/e1a0c942d670c5eeecb367a8d644c7ae9b999890 Cr-Commit-Position: refs/heads/master@{#11642}

Patch Set 1 : #

Total comments: 29

Patch Set 2 : #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : Add more tests and address comments #

Patch Set 5 : Merge with head #

Patch Set 6 : Fix sdp test error (do not signal network cost if it is 0) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -15 lines) Patch
M webrtc/api/java/jni/androidnetworkmonitor_jni.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/api/webrtcsdp.cc View 1 2 3 4 5 5 chunks +10 lines, -0 lines 0 comments Download
M webrtc/p2p/base/candidate.h View 1 2 3 4 chunks +16 lines, -4 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.cc View 1 5 chunks +19 lines, -6 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel_unittest.cc View 1 2 3 4 2 chunks +69 lines, -0 lines 0 comments Download
M webrtc/p2p/base/port.h View 1 3 chunks +8 lines, -0 lines 0 comments Download
M webrtc/p2p/base/port.cc View 1 5 chunks +16 lines, -0 lines 0 comments Download
M webrtc/p2p/base/stun.h View 1 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 39 (15 generated)
honghaiz3
This is the draft CL for prioritizing Wifi over cellualr. Have not included rtt in ...
4 years, 10 months ago (2016-02-04 21:01:42 UTC) #5
pthatcher1
"Cost" is a good name, but let's pick good names for the values. This looks ...
4 years, 10 months ago (2016-02-04 23:16:21 UTC) #6
juberti2
I think there are a few open design questions, so we should try to nail ...
4 years, 10 months ago (2016-02-04 23:31:10 UTC) #8
pthatcher1
https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc#newcode199 webrtc/p2p/base/port.cc:199: network_cost_ = (network_->type() == rtc::ADAPTER_TYPE_CELLULAR) ? 99 : 0; ...
4 years, 10 months ago (2016-02-04 23:51:18 UTC) #9
juberti2
On 2016/02/04 23:51:18, pthatcher1 wrote: > https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc > File webrtc/p2p/base/port.cc (right): > > https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc#newcode199 > ...
4 years, 10 months ago (2016-02-05 00:39:29 UTC) #10
honghaiz3
On 2016/02/05 00:39:29, juberti2 wrote: > On 2016/02/04 23:51:18, pthatcher1 wrote: > > https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc > ...
4 years, 10 months ago (2016-02-05 01:05:17 UTC) #11
honghaiz3
Made a few changes based on the comments and will leave the rest until further ...
4 years, 10 months ago (2016-02-05 01:36:46 UTC) #12
pthatcher1
On 2016/02/05 00:39:29, juberti2 wrote: > On 2016/02/04 23:51:18, pthatcher1 wrote: > > https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc > ...
4 years, 10 months ago (2016-02-05 01:40:22 UTC) #13
pthatcher1
https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc#newcode199 webrtc/p2p/base/port.cc:199: network_cost_ = (network_->type() == rtc::ADAPTER_TYPE_CELLULAR) ? 99 : 0; ...
4 years, 10 months ago (2016-02-05 01:42:35 UTC) #14
juberti2
On 2016/02/05 01:42:35, pthatcher1 wrote: > https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc > File webrtc/p2p/base/port.cc (right): > > https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc#newcode199 > ...
4 years, 10 months ago (2016-02-05 01:44:01 UTC) #15
pthatcher1
On 2016/02/05 01:05:17, honghaiz3 wrote: > On 2016/02/05 00:39:29, juberti2 wrote: > > On 2016/02/04 ...
4 years, 10 months ago (2016-02-05 01:45:52 UTC) #16
juberti2
On 2016/02/05 01:40:22, pthatcher1 wrote: > On 2016/02/05 00:39:29, juberti2 wrote: > > On 2016/02/04 ...
4 years, 10 months ago (2016-02-05 01:50:20 UTC) #17
honghaiz3
On 2016/02/05 01:45:52, pthatcher1 wrote: > On 2016/02/05 01:05:17, honghaiz3 wrote: > > On 2016/02/05 ...
4 years, 10 months ago (2016-02-05 01:56:48 UTC) #18
pthatcher1
On 2016/02/05 01:50:20, juberti2 wrote: > On 2016/02/05 01:40:22, pthatcher1 wrote: > > On 2016/02/05 ...
4 years, 10 months ago (2016-02-05 02:04:46 UTC) #19
honghaiz3
Revised the CL based on offline discussion. PTAL. https://codereview.webrtc.org/1668073002/diff/40001/talk/app/webrtc/webrtcsdp.cc File talk/app/webrtc/webrtcsdp.cc (right): https://codereview.webrtc.org/1668073002/diff/40001/talk/app/webrtc/webrtcsdp.cc#newcode1110 talk/app/webrtc/webrtcsdp.cc:1110: candidate->set_network_cost(std::min(cost, ...
4 years, 10 months ago (2016-02-11 21:12:28 UTC) #23
pthatcher1
Very close. Just need to beef up the unit tests a bit and a few ...
4 years, 10 months ago (2016-02-12 00:07:12 UTC) #24
honghaiz3
Thanks! PTAL. https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/1668073002/diff/40001/webrtc/p2p/base/port.cc#newcode1163 webrtc/p2p/base/port.cc:1163: int Connection::ComputeNetworkCost() const { On 2016/02/12 00:07:12, ...
4 years, 10 months ago (2016-02-12 19:28:44 UTC) #25
pthatcher1
lgtm https://codereview.webrtc.org/1668073002/diff/120001/webrtc/p2p/base/candidate.h File webrtc/p2p/base/candidate.h (right): https://codereview.webrtc.org/1668073002/diff/120001/webrtc/p2p/base/candidate.h#newcode30 webrtc/p2p/base/candidate.h:30: const uint32_t kMaxNetworkCost = 0xFFFF; On 2016/02/12 19:28:43, ...
4 years, 10 months ago (2016-02-12 20:05:26 UTC) #26
honghaiz3
Justin, Do you want to take another look at the CL? If I do not ...
4 years, 10 months ago (2016-02-12 20:14:09 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1668073002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1668073002/180001
4 years, 10 months ago (2016-02-12 22:27:20 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-12 23:30:27 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1668073002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1668073002/180001
4 years, 10 months ago (2016-02-16 21:53:48 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:180001)
4 years, 10 months ago (2016-02-16 22:55:00 UTC) #37
commit-bot: I haz the power
4 years, 10 months ago (2016-02-16 22:55:05 UTC) #39
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/e1a0c942d670c5eeecb367a8d644c7ae9b999890
Cr-Commit-Position: refs/heads/master@{#11642}

Powered by Google App Engine
This is Rietveld 408576698