From f3a381adcdb574894e2f6939219191ef677abc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Bostr=C3=B6m?= Date: Thu, 27 Jan 2022 10:02:14 +0100 Subject: [PATCH] Use kHigh timer precision for 'delayed-ack' timers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In SCTP, sending ACKs at the right time is presumably important in order not to cause unnecessary retransmissions. This CL sets the ACK timers to use high timer precision. This unblocks experimentally lowering the precision of the default, "low", timers in WebRTC. // All bots are green, but mac_chromium_compile is randomly timing out // independently of this CL and has been doing so for several days... NOTRY=True Bug: webrtc:13604 Change-Id: I1c81e3d0eeb477c3e00277d35649114c5edd249c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249090 Reviewed-by: Victor Boivie Commit-Queue: Henrik Boström Cr-Commit-Position: refs/heads/main@{#35813} --- net/dcsctp/socket/BUILD.gn | 1 + net/dcsctp/socket/transmission_control_block.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/dcsctp/socket/BUILD.gn b/net/dcsctp/socket/BUILD.gn index e8c64b09b8..083adaa9dd 100644 --- a/net/dcsctp/socket/BUILD.gn +++ b/net/dcsctp/socket/BUILD.gn @@ -98,6 +98,7 @@ rtc_library("transmission_control_block") { ":packet_sender", ":stream_reset_handler", "../../../api:array_view", + "../../../api/task_queue:task_queue", "../../../rtc_base", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", diff --git a/net/dcsctp/socket/transmission_control_block.h b/net/dcsctp/socket/transmission_control_block.h index 6d9dfc5e70..8cefbc65f4 100644 --- a/net/dcsctp/socket/transmission_control_block.h +++ b/net/dcsctp/socket/transmission_control_block.h @@ -19,6 +19,7 @@ #include "absl/functional/bind_front.h" #include "absl/strings/string_view.h" +#include "api/task_queue/task_queue_base.h" #include "net/dcsctp/common/sequence_numbers.h" #include "net/dcsctp/packet/chunk/cookie_echo_chunk.h" #include "net/dcsctp/packet/sctp_packet.h" @@ -78,7 +79,9 @@ class TransmissionControlBlock : public Context { this), TimerOptions(options.delayed_ack_max_timeout, TimerBackoffAlgorithm::kExponential, - /*max_restarts=*/0))), + /*max_restarts=*/0, + /*max_backoff_duration=*/absl::nullopt, + webrtc::TaskQueueBase::DelayPrecision::kHigh))), my_verification_tag_(my_verification_tag), my_initial_tsn_(my_initial_tsn), peer_verification_tag_(peer_verification_tag),