Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add T3-rtx timer and congestion control #11

Closed
kc5nra opened this issue Jul 24, 2018 · 17 comments
Closed

Add T3-rtx timer and congestion control #11

kc5nra opened this issue Jul 24, 2018 · 17 comments
Assignees

Comments

@kc5nra
Copy link
Contributor

kc5nra commented Jul 24, 2018

https://tools.ietf.org/html/rfc4960#section-6.3.3

@trivigy trivigy self-assigned this Sep 5, 2018
@trivigy

This comment has been minimized.

@Sean-Der

This comment has been minimized.

@trivigy

This comment has been minimized.

@Sean-Der

This comment has been minimized.

@trivigy

This comment has been minimized.

@trivigy

This comment has been minimized.

@trivigy

This comment has been minimized.

@Sean-Der

This comment has been minimized.

@trivigy trivigy removed their assignment Sep 15, 2018
@backkem backkem transferred this issue from pion/webrtc Jan 23, 2019
@enobufs
Copy link
Member

enobufs commented Feb 13, 2019

One consideration:
getPayloadDataToSend() method (will land on master soon) has time.Now() inside it. We should put it outside to make testing easier.

@kc5nra
Copy link
Contributor Author

kc5nra commented Feb 13, 2019

One consideration:
getPayloadDataToSend() method (will land on master soon) has time.Now() inside it. We should put it outside to make testing easier.

As well as time.Since

@backkem backkem mentioned this issue Feb 21, 2019
@enobufs
Copy link
Member

enobufs commented Feb 28, 2019

I am going to start working on this issue form this weekend. The implementation would somewhat relate to congestion control, #14 and likely #21 would be addressed all together.

During the work of pion/webrtc#334, I ran a test with lossy connections using Network Link Conditioner. I noticed nearly 40% of the time, data channel establishment stalled (at 10% packet loss ratio on both directions) although ICE state becomes connected, which is due to the lack of INIT and COOKIE ECHO retransmissions. This is very crucial for the real world use cases. So, I am thinking about implementing those in this work as well.

Retransmission timers missing:

  • T1-init timer
  • T1-cookie timer
  • T2-shutdown timer (note1)
  • T3-rtx timer
  • T5-shutdown-guard timer (note1)
  • Heartbeat timer (note2)

Note 1: this may be done after the shutdown is fully implemented in a separate issue

Note 2: this may be done after the heartbeat is implemented in a separate issue

enobufs added a commit that referenced this issue Mar 5, 2019
enobufs added a commit that referenced this issue Mar 7, 2019
Added rtoMin/Max cap, timeout failure and more tests.
Fixed some racde codntions
Relates to #11
enobufs added a commit that referenced this issue Mar 11, 2019
Also add timer ID for observers to distinguish timers
Relates to #11
enobufs added a commit to pion/transport that referenced this issue Mar 12, 2019
To be used by testing in sctp
Relates to pion/sctp#11
enobufs added a commit that referenced this issue Mar 12, 2019
Also simplified rtxTimer code
Relates to #11
This was referenced Mar 13, 2019
@enobufs
Copy link
Member

enobufs commented Mar 15, 2019

I created a separate issue #24 for T1-init/cookie timers as I'd like to make these timers available earlier.

enobufs added a commit that referenced this issue Mar 15, 2019
Also simplified rtxTimer code
Relates to #11
enobufs added a commit to pion/transport that referenced this issue Mar 17, 2019
To be used by testing in sctp
Relates to pion/sctp#11
enobufs added a commit to pion/transport that referenced this issue Mar 17, 2019
To be used by testing in sctp
Relates to pion/sctp#11
enobufs added a commit that referenced this issue Mar 17, 2019
Also simplified rtxTimer code
Relates to #11
enobufs added a commit that referenced this issue Apr 5, 2019
Use errors.Errorf cosistently within association.go
Resolves #11
enobufs added a commit that referenced this issue Apr 5, 2019
Do not capitalize the beginning of the error message
Resolves #11
enobufs added a commit that referenced this issue Apr 5, 2019
All printing to stdio must be done via pion/logging, all calls to common
printing functions will not cause CI to fail
Resolves #11
@enobufs
Copy link
Member

enobufs commented Apr 6, 2019

I found a bug in handleForwardTSN() sending SACK to every single FowardTSN. The SACK again generates ForwardTSN beyond advancedPeerTSNAckPoint.

According to RFC 3758 Sec 3.6, SACK should only be sent when FowardTSN's newCumulativeTSN is the current peerLastTSN or behind - which was not correctly implemented!

I have locally confirmed that this fixed the "snowballing effect", and my stress test passed.

I will add the change to PR #26 soon. (@Sean-Der)

enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
Fixed a typo in the comment
Put pendingQueue in a separate file
Made T3 timer not to stop (rtx forever)
Other minor cleanups
Resolves #11
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
Optimized the pending queue.
Resolves #11
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
This is unrelated to #11 but revealed in the new test added to webrtc
package.
Relates to #11
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
Cleaned up comments
Removed one last fmt.Print*
Adjusted Congestion Avoidance test duration
Resolves #11
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
enobufs added a commit that referenced this issue Apr 6, 2019
Use errors.Errorf cosistently within association.go
Resolves #11
enobufs added a commit that referenced this issue Apr 6, 2019
Do not capitalize the beginning of the error message
Resolves #11
enobufs added a commit that referenced this issue Apr 6, 2019
All printing to stdio must be done via pion/logging, all calls to common
printing functions will not cause CI to fail
Resolves #11
enobufs added a commit that referenced this issue Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants