dcsctp: Allow more outstanding fragments There limit that decides if an incoming TSN should be accepted or not was decided based on very small transfers with no packet loss. But in simulations where a socket tries to send a lot of data and when there is moderate packet loss, the number of tracker data chunks on the receive side will be considerably higher than what the limit was. Set the limit to allow high data rate also on moderate packet loss. Bug: webrtc:12799 Change-Id: I6ca237e5609d8b511e9b10c919da33dca7420c01 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/220761 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Victor Boivie <boivie@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34169}
diff --git a/net/dcsctp/rx/data_tracker.h b/net/dcsctp/rx/data_tracker.h index 63b7d8f..b822bd3 100644 --- a/net/dcsctp/rx/data_tracker.h +++ b/net/dcsctp/rx/data_tracker.h
@@ -48,7 +48,7 @@ // received data. Data received beyond this limit will be dropped, which will // force the transmitter to send data that actually increases the last // cumulative acked TSN. - static constexpr uint32_t kMaxAcceptedOutstandingFragments = 256; + static constexpr uint32_t kMaxAcceptedOutstandingFragments = 100000; explicit DataTracker(absl::string_view log_prefix, Timer* delayed_ack_timer,
diff --git a/net/dcsctp/rx/data_tracker_test.cc b/net/dcsctp/rx/data_tracker_test.cc index 5a95552..ac482c2 100644 --- a/net/dcsctp/rx/data_tracker_test.cc +++ b/net/dcsctp/rx/data_tracker_test.cc
@@ -226,8 +226,6 @@ size_t limit = DataTracker::kMaxAcceptedOutstandingFragments; EXPECT_FALSE(buf_.IsTSNValid(TSN(*last_tsn + limit + 1))); EXPECT_FALSE(buf_.IsTSNValid(TSN(*last_tsn - (limit + 1)))); - EXPECT_FALSE(buf_.IsTSNValid(TSN(*last_tsn + 65536))); - EXPECT_FALSE(buf_.IsTSNValid(TSN(*last_tsn - 65536))); EXPECT_FALSE(buf_.IsTSNValid(TSN(*last_tsn + 0x8000000))); EXPECT_FALSE(buf_.IsTSNValid(TSN(*last_tsn - 0x8000000))); }