From adfe54c965086fb38ebe250caba107add8f4889a Mon Sep 17 00:00:00 2001 From: Victor Boivie Date: Tue, 21 Sep 2021 20:56:50 +0200 Subject: [PATCH] dcsctp: Remove the TCP style cwnd doubling It wasn't correct and not enabled by default, so just remove it. Bug: webrtc:12943 Change-Id: Idd426abd0da4ae259e519dd01239b4303296756a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232609 Commit-Queue: Victor Boivie Reviewed-by: Florent Castelli Cr-Commit-Position: refs/heads/main@{#35075} --- net/dcsctp/public/dcsctp_options.h | 3 --- net/dcsctp/tx/retransmission_queue.cc | 6 +----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/net/dcsctp/public/dcsctp_options.h b/net/dcsctp/public/dcsctp_options.h index 2ac2aff9bf..c394552e22 100644 --- a/net/dcsctp/public/dcsctp_options.h +++ b/net/dcsctp/public/dcsctp_options.h @@ -143,9 +143,6 @@ struct DcSctpOptions { // https://datatracker.ietf.org/doc/html/rfc6298#section-4. DurationMs min_rtt_variance = DurationMs(220); - // Do slow start as TCP - double cwnd instead of increasing it by MTU. - bool slow_start_tcp_style = false; - // The initial congestion window size, in number of MTUs. // See https://tools.ietf.org/html/rfc4960#section-7.2.1 which defaults at ~3 // and https://research.google/pubs/pub36640/ which argues for at least ten diff --git a/net/dcsctp/tx/retransmission_queue.cc b/net/dcsctp/tx/retransmission_queue.cc index 57154b30db..d45c274108 100644 --- a/net/dcsctp/tx/retransmission_queue.cc +++ b/net/dcsctp/tx/retransmission_queue.cc @@ -249,11 +249,7 @@ void RetransmissionQueue::HandleIncreasedCumulativeTsnAck( // conditions are met, then cwnd MUST be increased by, at most, the // lesser of 1) the total size of the previously outstanding DATA // chunk(s) acknowledged, and 2) the destination's path MTU." - if (options_.slow_start_tcp_style) { - cwnd_ += std::min(total_bytes_acked, cwnd_); - } else { - cwnd_ += std::min(total_bytes_acked, options_.mtu); - } + cwnd_ += std::min(total_bytes_acked, options_.mtu); RTC_DLOG(LS_VERBOSE) << log_prefix_ << "SS increase cwnd=" << cwnd_ << " (" << old_cwnd << ")"; }