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

Issue 1944683002: Read recv timestamps from socket (posix only). (Closed)

Created:
4 years, 7 months ago by stefan-webrtc
Modified:
4 years, 7 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

Read recv timestamps from socket (posix only). This helps a lot on Android devices where the user threads can be scheduled with low priority when the app is in the background, causing spurious significantly delayed before a packet can be read from the socket. With this patch the timestamp is taken by the kernel when the packet actually arrives. R=juberti@chromium.org TBR=juberti@webrtc.org BUG=webrtc:5773 Committed: https://chromium.googlesource.com/external/webrtc/+/9131efdb30f2ad37e252ace2c5fcd65fdef288f5

Patch Set 1 #

Patch Set 2 : Cleanup #

Patch Set 3 : Cleanup 2. #

Patch Set 4 : Fix build. #

Patch Set 5 : Fix win build. #

Total comments: 4

Patch Set 6 : Comments addressed. #

Patch Set 7 : Improve test. #

Total comments: 2

Patch Set 8 : Improve tests. #

Patch Set 9 : Add tests to more extensively ensure timestamps work over a longer interval. #

Patch Set 10 : More robust tests. #

Patch Set 11 : Disable ipv6 test on Linux due to bot issues. #

Total comments: 1

Patch Set 12 : Adds a better test to verify the timestamp is set. #

Patch Set 13 : Don't run test on Mac. #

Patch Set 14 : Fix mem leak. #

Patch Set 15 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -89 lines) Patch
M webrtc/base/asyncsocket.h View 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/asyncsocket.cc View 1 chunk +7 lines, -4 lines 0 comments Download
M webrtc/base/asynctcpsocket.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/base/asyncudpsocket.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -3 lines 0 comments Download
M webrtc/base/autodetectproxy.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/firewallsocketserver.cc View 2 chunks +8 lines, -5 lines 0 comments Download
M webrtc/base/macasyncsocket.h View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/macasyncsocket.cc View 1 2 3 4 5 2 chunks +11 lines, -3 lines 0 comments Download
M webrtc/base/nat_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/natsocketfactory.cc View 1 2 3 4 5 3 chunks +9 lines, -6 lines 0 comments Download
M webrtc/base/openssladapter.h View 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/openssladapter.cc View 1 2 3 4 5 3 chunks +8 lines, -7 lines 0 comments Download
M webrtc/base/physicalsocketserver.h View 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/physicalsocketserver.cc View 1 2 3 4 5 6 7 5 chunks +30 lines, -2 lines 0 comments Download
M webrtc/base/physicalsocketserver_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +15 lines, -0 lines 0 comments Download
M webrtc/base/proxyserver.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/socket.h View 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/socket_unittest.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/base/socket_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +29 lines, -4 lines 0 comments Download
M webrtc/base/socketadapters.h View 2 chunks +6 lines, -3 lines 0 comments Download
M webrtc/base/socketadapters.cc View 1 2 3 4 5 5 chunks +12 lines, -8 lines 0 comments Download
M webrtc/base/socketstream.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/ssladapter_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/testclient.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -1 line 0 comments Download
M webrtc/base/testclient.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +33 lines, -6 lines 0 comments Download
M webrtc/base/testutils.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/virtualsocket_unittest.cc View 1 2 3 4 5 6 7 7 chunks +7 lines, -7 lines 0 comments Download
M webrtc/base/virtualsocketserver.h View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/virtualsocketserver.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -3 lines 0 comments Download
M webrtc/base/win32socketserver.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -2 lines 0 comments Download
M webrtc/base/win32socketserver.cc View 1 2 3 4 5 6 7 2 chunks +11 lines, -3 lines 0 comments Download
M webrtc/examples/peerconnection/client/peer_connection_client.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M webrtc/libjingle/xmpp/xmppsocket.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/libjingle/xmpp/xmppsocket.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 79 (28 generated)
stefan-webrtc
Cleanup
4 years, 7 months ago (2016-05-03 11:07:40 UTC) #2
stefan-webrtc
Cleanup 2.
4 years, 7 months ago (2016-05-03 11:08:20 UTC) #3
stefan-webrtc
4 years, 7 months ago (2016-05-03 11:10:26 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/40001
4 years, 7 months ago (2016-05-03 11:10:42 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios64_sim_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/ios64_sim_dbg/builds/7168) ios_arm64_dbg on ...
4 years, 7 months ago (2016-05-03 11:12:32 UTC) #9
stefan-webrtc
Fix build.
4 years, 7 months ago (2016-05-03 11:51:40 UTC) #10
stefan-webrtc
Fix win build.
4 years, 7 months ago (2016-05-03 12:07:10 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/80001
4 years, 7 months ago (2016-05-03 12:14:48 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL) ...
4 years, 7 months ago (2016-05-03 14:15:54 UTC) #15
stefan-webrtc
It would be great to get this reviewed, as it's something we really want to ...
4 years, 7 months ago (2016-05-05 14:49:50 UTC) #16
juberti2
Overall LG Needs unit test in physicalsocketserver_unittest https://codereview.webrtc.org/1944683002/diff/80001/webrtc/base/physicalsocketserver.cc File webrtc/base/physicalsocketserver.cc (right): https://codereview.webrtc.org/1944683002/diff/80001/webrtc/base/physicalsocketserver.cc#newcode65 webrtc/base/physicalsocketserver.cc:65: int ret ...
4 years, 7 months ago (2016-05-11 05:03:34 UTC) #19
stefan-webrtc
Comments addressed.
4 years, 7 months ago (2016-05-11 08:11:43 UTC) #20
stefan-webrtc
Improve test.
4 years, 7 months ago (2016-05-11 08:30:17 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/120001
4 years, 7 months ago (2016-05-11 08:30:53 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_compile_x86_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_compile_x86_dbg/builds/3899)
4 years, 7 months ago (2016-05-11 08:40:45 UTC) #25
stefan-webrtc
I added a timestamp verification in TestClient used by all the unittests for PhysicalSocketServer. https://codereview.webrtc.org/1944683002/diff/80001/webrtc/base/physicalsocketserver.cc ...
4 years, 7 months ago (2016-05-11 08:41:14 UTC) #26
juberti2
LG once unit testing is sufficient https://codereview.webrtc.org/1944683002/diff/120001/webrtc/base/testclient.cc File webrtc/base/testclient.cc (right): https://codereview.webrtc.org/1944683002/diff/120001/webrtc/base/testclient.cc#newcode96 webrtc/base/testclient.cc:96: (prev_packet_timestamp_ == -1 ...
4 years, 7 months ago (2016-05-11 19:57:22 UTC) #27
stefan-webrtc
Improve tests.
4 years, 7 months ago (2016-05-12 09:13:12 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/140001
4 years, 7 months ago (2016-05-12 09:15:29 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_compile_x86_dbg on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/android_compile_x86_dbg/builds/3964)
4 years, 7 months ago (2016-05-12 09:22:18 UTC) #32
stefan-webrtc
Add tests to more extensively ensure timestamps work over a longer interval.
4 years, 7 months ago (2016-05-12 11:18:55 UTC) #33
stefan-webrtc
I added a test which ensures that the timestamps are right for a longer interval ...
4 years, 7 months ago (2016-05-12 11:19:53 UTC) #34
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/160001
4 years, 7 months ago (2016-05-12 11:21:28 UTC) #36
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_asan on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_asan/builds/14643)
4 years, 7 months ago (2016-05-12 11:30:02 UTC) #38
stefan-webrtc
More robust tests.
4 years, 7 months ago (2016-05-16 08:17:37 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/180001
4 years, 7 months ago (2016-05-16 08:20:08 UTC) #41
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_asan on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_asan/builds/14721)
4 years, 7 months ago (2016-05-16 08:31:30 UTC) #43
stefan-webrtc
Disable ipv6 test on Linux due to bot issues.
4 years, 7 months ago (2016-05-16 12:07:40 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/200001
4 years, 7 months ago (2016-05-16 12:08:03 UTC) #46
stefan-webrtc
Justin, could you take another look at this?
4 years, 7 months ago (2016-05-16 13:00:02 UTC) #47
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_rel on tryserver.webrtc (JOB_TIMED_OUT, no build URL)
4 years, 7 months ago (2016-05-16 14:08:34 UTC) #49
juberti2
On 2016/05/12 11:19:53, stefan-webrtc (holmer) wrote: > I added a test which ensures that the ...
4 years, 7 months ago (2016-05-17 06:41:35 UTC) #50
juberti2
https://codereview.webrtc.org/1944683002/diff/200001/webrtc/base/physicalsocketserver_unittest.cc File webrtc/base/physicalsocketserver_unittest.cc (right): https://codereview.webrtc.org/1944683002/diff/200001/webrtc/base/physicalsocketserver_unittest.cc#newcode452 webrtc/base/physicalsocketserver_unittest.cc:452: SocketTest::TestUdpIpv6Interval(); Isn't this handled in socket_unittest already?
4 years, 7 months ago (2016-05-17 06:41:49 UTC) #51
stefan-webrtc
On 2016/05/17 06:41:35, juberti2 wrote: > On 2016/05/12 11:19:53, stefan-webrtc (holmer) wrote: > > I ...
4 years, 7 months ago (2016-05-17 07:34:15 UTC) #52
stefan-webrtc
Adds a better test to verify the timestamp is set.
4 years, 7 months ago (2016-05-17 09:44:49 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/220001
4 years, 7 months ago (2016-05-17 10:26:16 UTC) #55
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_rel on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/mac_rel/builds/15176)
4 years, 7 months ago (2016-05-17 10:40:58 UTC) #57
stefan-webrtc
Don't run test on Mac.
4 years, 7 months ago (2016-05-17 10:43:52 UTC) #58
stefan-webrtc
Fix mem leak.
4 years, 7 months ago (2016-05-17 10:47:33 UTC) #59
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/260001
4 years, 7 months ago (2016-05-17 10:48:24 UTC) #61
stefan-webrtc
I went with the approach of testing on a Socket directly, without using AsyncSocket. That ...
4 years, 7 months ago (2016-05-17 11:33:33 UTC) #62
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-17 12:59:30 UTC) #64
juberti2
On 2016/05/17 11:33:33, stefan-webrtc (holmer) wrote: > I went with the approach of testing on ...
4 years, 7 months ago (2016-05-18 06:09:41 UTC) #65
stefan-webrtc
On 2016/05/18 06:09:41, juberti2 wrote: > On 2016/05/17 11:33:33, stefan-webrtc (holmer) wrote: > > I ...
4 years, 7 months ago (2016-05-19 12:53:49 UTC) #66
juberti2
lgtm Go ahead and land this - my comments are pretty minor, and can be ...
4 years, 7 months ago (2016-05-23 06:19:36 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/260001
4 years, 7 months ago (2016-05-23 13:34:03 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: presubmit on tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/presubmit/builds/5756)
4 years, 7 months ago (2016-05-23 13:44:47 UTC) #71
stefan-webrtc
Justin, I need an lgtm from your webrtc.org account.
4 years, 7 months ago (2016-05-23 13:50:05 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1944683002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1944683002/260001
4 years, 7 months ago (2016-05-23 15:39:14 UTC) #75
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/9131efdb30f2ad37e252ace2c5fcd65fdef288f5 Cr-Commit-Position: refs/heads/master@{#12850}
4 years, 7 months ago (2016-05-23 16:19:48 UTC) #78
stefan-webrtc
4 years, 7 months ago (2016-05-23 16:19:49 UTC) #79
Message was sent while issue was closed.
Committed patchset #15 (id:280001) manually as
9131efdb30f2ad37e252ace2c5fcd65fdef288f5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698