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

Issue 2912523003: Fix issue with send-side bandwidth estimation over TURN TCP connections. (Closed)

Created:
3 years, 6 months ago by Taylor Brandstetter
Modified:
3 years, 6 months ago
Reviewers:
holmer, juberti1, pthatcher1
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, stefan-webrtc
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix issue with send-side bandwidth estimation over TURN TCP connections. AsyncStunTCPSocket wasn't firing SignalSentPacket, which the bandwidth estimator requires for every packet in order to look up send times when feedback arrives. If the signal isn't fired, it always assumes feedback is arriving extremely late, and decreases the bandwidth by a factor of 2 until it reaches the minimum of 10kbps. BUG=webrtc:7717 TBR=pthatcher@webrtc.org Review-Url: https://codereview.webrtc.org/2912523003 Cr-Commit-Position: refs/heads/master@{#18279} Committed: https://chromium.googlesource.com/external/webrtc/+/b56671e0517d4de773faeaa645af40840e863e79

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -0 lines) Patch
M webrtc/p2p/base/asyncstuntcpsocket.cc View 1 chunk +3 lines, -0 lines 3 comments Download
M webrtc/p2p/base/asyncstuntcpsocket_unittest.cc View 4 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
Taylor Brandstetter
PTAL
3 years, 6 months ago (2017-05-27 01:21:31 UTC) #2
Taylor Brandstetter
PTAL
3 years, 6 months ago (2017-05-27 01:21:32 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2912523003/1
3 years, 6 months ago (2017-05-27 01:22:25 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/external/webrtc/+/b56671e0517d4de773faeaa645af40840e863e79
3 years, 6 months ago (2017-05-27 01:40:10 UTC) #9
juberti1
https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcpsocket.cc File webrtc/p2p/base/asyncstuntcpsocket.cc (right): https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcpsocket.cc#newcode82 webrtc/p2p/base/asyncstuntcpsocket.cc:82: rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis()); This signal should probably only be ...
3 years, 6 months ago (2017-05-27 23:17:21 UTC) #11
juberti1
On 2017/05/27 23:17:21, juberti1 wrote: > https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcpsocket.cc > File webrtc/p2p/base/asyncstuntcpsocket.cc (right): > > https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcpsocket.cc#newcode82 > ...
3 years, 6 months ago (2017-06-01 23:44:06 UTC) #13
holmer
https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcpsocket.cc File webrtc/p2p/base/asyncstuntcpsocket.cc (right): https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcpsocket.cc#newcode82 webrtc/p2p/base/asyncstuntcpsocket.cc:82: rtc::SentPacket sent_packet(options.packet_id, rtc::TimeMillis()); On 2017/05/27 23:17:21, juberti1 wrote: > ...
3 years, 6 months ago (2017-06-02 07:08:00 UTC) #15
Taylor Brandstetter
3 years, 6 months ago (2017-06-02 17:42:43 UTC) #16
Message was sent while issue was closed.
https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcps...
File webrtc/p2p/base/asyncstuntcpsocket.cc (right):

https://codereview.webrtc.org/2912523003/diff/1/webrtc/p2p/base/asyncstuntcps...
webrtc/p2p/base/asyncstuntcpsocket.cc:82: rtc::SentPacket
sent_packet(options.packet_id, rtc::TimeMillis());
On 2017/06/02 07:08:00, holmer wrote:
> Yes, I agree. If I correctly understand how the TCP socket classes interact,
I'd
> say the signal should be fired in the implementation of socket_:
>
https://cs.chromium.org/chromium/src/third_party/webrtc/base/asynctcpsocket.c...
> 
> which should be where we send the packet to the real socket.

I guess I don't see how filling a buffer in userspace differs fundamentally from
filling a buffer in kernel space. I thought the main purpose of SignalSentPacket
was to eliminate jitter due to IPC between the browser/renderer processes.

But anyway: this is copying the existing behavior of AsyncTcpSocket, so if this
is an issue it's one that already existed.

> When we run in Chrome, I assume that socket may be the IpcPacketSocket? In
that
> case we really want the signal fired from the browser process, which maybe
this
> signal now overrides?
> 
> If I've understood correctly, I think we may want to connect to this signal
> instead:
>
https://cs.chromium.org/chromium/src/content/renderer/p2p/ipc_socket_factory....

In chromium, we connect to that signal; in native apps we connect to this one.
This class is only created by BasicPacketSocketFactory, but chromium uses
IpcPacketSocketFactory as you mentioned.

Powered by Google App Engine
This is Rietveld 408576698