webrtc/net/dcsctp/socket
Victor Boivie 0ca62e3752 dcsctp: Avoid bundling FORWARD-TSN and DATA chunks
dcSCTP seems to be able to provoke usrsctp to send ABORT in some
situations, as described in
https://github.com/sctplab/usrsctp/issues/597. Using a packetdrill
script, it seems as a contributing factor to this behavior is when a
FORWARD-TSN chunk is bundled with a DATA chunk. This is a valid and
recommended pattern in RFC3758:

  "F2) The data sender SHOULD always attempt to bundle an outgoing
       FORWARD TSN with outbound DATA chunks for efficiency."

However, that seems to be a rare event in usrsctp, which generally sends
each FORWARD-TSN in a separate packet.

By doing the same, the assumption is that this scenario will generally
be avoided.

With many browsers and other clients using usrsctp, and which will not
be upgraded for a long time, there is an advantage of avoiding the issue
even if it is according to specification.

Before this change, a FORWARD-TSN was bundled with outgoing DATA and due
to this, it wasn't rate limited as the overhead was very little. With
this change, a rate limiting behavior has been added to avoid sending
too many FORWARD-TSN in small packets. It will be sent every RTT, or
200 ms, whichever is smallest. This is also described in the RFC.

Bug: webrtc:12961
Change-Id: I3d8036a34f999f405958982534bfa0e99e330da3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229101
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34801}
2021-08-19 11:28:40 +00:00
..
BUILD.gn dcsctp: Removing all references to unordered_map 2021-08-18 19:55:07 +00:00
callback_deferrer.h dcsctp: Add API to indicate packet send status 2021-08-16 11:29:47 +00:00
capabilities.h dcsctp: Add Transmission Control Block 2021-04-28 22:45:03 +00:00
context.h dcsctp: Add Context 2021-04-25 17:43:08 +00:00
dcsctp_socket.cc dcsctp: Add PacketSender 2021-08-16 20:19:53 +00:00
dcsctp_socket.h dcsctp: Add PacketSender 2021-08-16 20:19:53 +00:00
dcsctp_socket_test.cc dcsctp: Avoid bundling FORWARD-TSN and DATA chunks 2021-08-19 11:28:40 +00:00
heartbeat_handler.cc dcsctp: Migrating to using absl::bind_front 2021-08-16 11:51:27 +00:00
heartbeat_handler.h dcsctp: Add Heartbeat Handler 2021-04-25 20:40:18 +00:00
heartbeat_handler_test.cc dcsctp: Allow heartbeats to be disabled 2021-05-31 12:19:38 +00:00
mock_context.h dcsctp: Add API to indicate packet send status 2021-08-16 11:29:47 +00:00
mock_dcsctp_socket_callbacks.h dcsctp: Add API to indicate packet send status 2021-08-16 11:29:47 +00:00
packet_sender.cc dcsctp: Add PacketSender 2021-08-16 20:19:53 +00:00
packet_sender.h dcsctp: Add PacketSender 2021-08-16 20:19:53 +00:00
packet_sender_test.cc dcsctp: Add PacketSender 2021-08-16 20:19:53 +00:00
state_cookie.cc dcsctp: Add Socket 2021-05-01 07:16:21 +00:00
state_cookie.h dcsctp: Add Socket 2021-05-01 07:16:21 +00:00
state_cookie_test.cc dcsctp: Add Socket 2021-05-01 07:16:21 +00:00
stream_reset_handler.cc dcsctp: Removing all references to unordered_map 2021-08-18 19:55:07 +00:00
stream_reset_handler.h dcsctp: Removing all references to unordered_map 2021-08-18 19:55:07 +00:00
stream_reset_handler_test.cc dcsctp: Add API to indicate packet send status 2021-08-16 11:29:47 +00:00
transmission_control_block.cc dcsctp: Avoid bundling FORWARD-TSN and DATA chunks 2021-08-19 11:28:40 +00:00
transmission_control_block.h dcsctp: Avoid bundling FORWARD-TSN and DATA chunks 2021-08-19 11:28:40 +00:00