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

Issue 13584008: Send notification about outgoing p2p packets from browser to renderer. (Closed)

Created:
7 years, 8 months ago by Sergey Ulanov
Modified:
7 years, 8 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, pwestin1
Visibility:
Public.

Description

Fix IpcPacketSocketFactory to return EWOULDBLOCK when network interface is congested. PeerConnection implementation in libjingle will need to handle the case when a network interface is congested, so it needs to be notified when send buffers are full. This CL adds send result notification message that is sent to the renderer process after each message is sent. Sockets created using IpcPacketSocketFactory will be returning EWOULDBLOCK when Send() buffers are full instead of dropping the packet silently. BUG=226158 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=192721

Patch Set 1 : #

Total comments: 12

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -84 lines) Patch
M content/browser/renderer_host/p2p/socket_host.h View 1 chunk +0 lines, -9 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp.cc View 1 3 chunks +30 lines, -42 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc View 3 chunks +13 lines, -0 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_udp.h View 1 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_udp.cc View 1 5 chunks +19 lines, -22 lines 0 comments Download
M content/browser/renderer_host/p2p/socket_host_udp_unittest.cc View 3 chunks +11 lines, -0 lines 0 comments Download
M content/common/p2p_messages.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/p2p/ipc_socket_factory.cc View 1 2 7 chunks +40 lines, -5 lines 2 comments Download
M content/renderer/p2p/socket_client.h View 4 chunks +6 lines, -1 line 0 comments Download
M content/renderer/p2p/socket_client.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M content/renderer/p2p/socket_dispatcher.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/p2p/socket_dispatcher.cc View 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
Sergey Ulanov
ronghuawu@ - please review this change. cevans@ - please approve changes in p2p_messages.h
7 years, 8 months ago (2013-04-03 22:41:28 UTC) #1
Ronghua Wu (Left Chromium)
+juberti
7 years, 8 months ago (2013-04-04 04:39:10 UTC) #2
Ronghua Wu (Left Chromium)
This change is more than the notification, you also add write_queue_ to host_tcp etc. Maybe ...
7 years, 8 months ago (2013-04-04 05:23:59 UTC) #3
Sergey Ulanov
https://codereview.chromium.org/13584008/diff/1001/content/browser/renderer_host/p2p/socket_host_tcp.cc File content/browser/renderer_host/p2p/socket_host_tcp.cc (right): https://codereview.chromium.org/13584008/diff/1001/content/browser/renderer_host/p2p/socket_host_tcp.cc#newcode241 content/browser/renderer_host/p2p/socket_host_tcp.cc:241: if (result < 0) { On 2013/04/04 05:23:59, Ronghua ...
7 years, 8 months ago (2013-04-04 18:40:34 UTC) #4
juberti
I still don't understand why we want to keep a write queue when the OS ...
7 years, 8 months ago (2013-04-04 22:33:45 UTC) #5
pwestin
Since we don't have a synchronous call path from webrtc to the chrome udp socket, ...
7 years, 8 months ago (2013-04-04 22:37:42 UTC) #6
juberti
Still don't understand why OS socket buffer isn't sufficient.
7 years, 8 months ago (2013-04-04 22:40:29 UTC) #7
pwestin
it's currently only 9k for UDP in chrome, maybe we can change that but the ...
7 years, 8 months ago (2013-04-04 22:44:06 UTC) #8
juberti
I think 9k is plenty big, possibly too big. If the buffer fills, any queued ...
7 years, 8 months ago (2013-04-04 22:49:47 UTC) #9
pwestin
we can try both approaches once this lands. On Thu, Apr 4, 2013 at 3:49 ...
7 years, 8 months ago (2013-04-04 22:56:19 UTC) #10
Sergey Ulanov
On 2013/04/04 22:33:45, juberti wrote: > I still don't understand why we want to keep ...
7 years, 8 months ago (2013-04-04 23:03:38 UTC) #11
juberti
On 2013/04/04 23:03:38, sergeyu wrote: > On 2013/04/04 22:33:45, juberti wrote: > > I still ...
7 years, 8 months ago (2013-04-04 23:08:32 UTC) #12
Sergey Ulanov
On 2013/04/04 23:08:32, juberti wrote: > On 2013/04/04 23:03:38, sergeyu wrote: > > On 2013/04/04 ...
7 years, 8 months ago (2013-04-04 23:15:29 UTC) #13
juberti
On 2013/04/04 23:15:29, sergeyu wrote: > On 2013/04/04 23:08:32, juberti wrote: > > On 2013/04/04 ...
7 years, 8 months ago (2013-04-04 23:41:04 UTC) #14
Ronghua Wu (Left Chromium)
LGTM if Justin is fine with the approach. https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc File content/renderer/p2p/ipc_socket_factory.cc (right): https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc#newcode200 content/renderer/p2p/ipc_socket_factory.cc:200: return ...
7 years, 8 months ago (2013-04-04 23:53:02 UTC) #15
juberti
Since the only way we know if we're unable to send is if we try ...
7 years, 8 months ago (2013-04-05 00:01:45 UTC) #16
Ronghua Wu (Left Chromium)
https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc File content/renderer/p2p/ipc_socket_factory.cc (right): https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc#newcode200 content/renderer/p2p/ipc_socket_factory.cc:200: return EWOULDBLOCK; Should we set error_ to EWOULDBLOCK? IOW, ...
7 years, 8 months ago (2013-04-05 17:56:04 UTC) #17
Sergey Ulanov
https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc File content/renderer/p2p/ipc_socket_factory.cc (right): https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc#newcode200 content/renderer/p2p/ipc_socket_factory.cc:200: return EWOULDBLOCK; On 2013/04/05 17:56:04, Ronghua Wu wrote: > ...
7 years, 8 months ago (2013-04-05 21:04:03 UTC) #18
Ronghua Wu (Left Chromium)
https://codereview.chromium.org/13584008/diff/32001/content/renderer/p2p/ipc_socket_factory.cc File content/renderer/p2p/ipc_socket_factory.cc (right): https://codereview.chromium.org/13584008/diff/32001/content/renderer/p2p/ipc_socket_factory.cc#newcode209 content/renderer/p2p/ipc_socket_factory.cc:209: NOTREACHED(); set error_ here and all the "return -1".
7 years, 8 months ago (2013-04-05 21:51:57 UTC) #19
juberti
On 2013/04/05 21:04:03, sergeyu wrote: > https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc > File content/renderer/p2p/ipc_socket_factory.cc (right): > > https://codereview.chromium.org/13584008/diff/17002/content/renderer/p2p/ipc_socket_factory.cc#newcode200 > ...
7 years, 8 months ago (2013-04-05 21:56:20 UTC) #20
Sergey Ulanov
https://codereview.chromium.org/13584008/diff/32001/content/renderer/p2p/ipc_socket_factory.cc File content/renderer/p2p/ipc_socket_factory.cc (right): https://codereview.chromium.org/13584008/diff/32001/content/renderer/p2p/ipc_socket_factory.cc#newcode209 content/renderer/p2p/ipc_socket_factory.cc:209: NOTREACHED(); On 2013/04/05 21:51:57, Ronghua Wu wrote: > set ...
7 years, 8 months ago (2013-04-05 22:28:14 UTC) #21
jschuh
ipc security lgtm. innocuous looking browser -> renderer.
7 years, 8 months ago (2013-04-05 22:53:27 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sergeyu@chromium.org/13584008/32001
7 years, 8 months ago (2013-04-05 22:55:40 UTC) #23
commit-bot: I haz the power
7 years, 8 months ago (2013-04-06 06:59:44 UTC) #24
Message was sent while issue was closed.
Change committed as 192721

Powered by Google App Engine
This is Rietveld 408576698