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

Added new option: SRTO_SNDDROPDELAY #375

Merged
merged 3 commits into from
Jun 22, 2018

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented May 4, 2018

This option influences the condition under which the SND-DROPPING happens (dropping packets already at the sender side when it would be useless as the receiver will drop them anyway due to coming too late).

This option defines an extra delay time that can be applied to check, if sending wouldn't be too late, or may even disable SND-DROPPING completely if set to -1. The unit is, like latency, in ms. An important treat of this option is that, in contrast to SRTO_LATENCY and SRTO_TLPKTDROP, this option may be altered also when the socket is connected, that is, the application may manipulate this option during transmission.

@jeandube
Copy link
Collaborator

jeandube commented May 4, 2018

This PR only permits to extend the delay. To enable full control I would replace it by SRTO_SNDDROPMINDELAY and set the value currently hard coded. This way it can be set to 0 and the delay will depends on the configured SRTO_LATENCY. I would also restore the possibility to disable TLPKTDROP in a sender (preferably with a setting independent for RCV and SND. And finally I would study the possibility to enable send flow control (EWOUDBLOCK) based on the SNDDROP value instead of the full send buffer size. I assume that setting the send buffer size after handshake (and Latency agreement) is more complex than setting a threshold.

@ethouris
Copy link
Collaborator Author

ethouris commented May 16, 2018

Currently this delay threshold is defined as:

    int threshold_ms = std::max(m_iPeerTsbPdDelay_ms, SRT_TLPKTDROP_MINTHRESHOLD_MS)
            + (2*COMM_SYN_INTERVAL_US/1000);

Where SRT_TLPKTDROP_MINTHRESHOLD_MS is 1000, and this is the actual minimum to wait, the next part results in 20ms.

This option is predicted to allow to track the problem when the sender-tlpktdrop is overreacting, that is, it drops the packet that wouldn't be dropped by TLPKTDROP on the receiver. If we want to have a value that would be less than the currently defined threshold, it should allow us to overreact even more. Not sure what we'd like to achieve with such testing, but maybe it has some merit, although I'd prefer rather a value of 0 to maintain the current state, with possibly a negative value that would be used to subtract from the current extra delay (1020). Just a little bit doubtful would be then using the -1 value as a special value to turn off sender TLPKTDROP.

This way you'd have to set snddropdelay=-1020 in order to have a delay only so big as the latency.

@rndi rndi merged commit 96d126a into Haivision:master Jun 22, 2018
@ethouris ethouris deleted the dev-add-snddropdelay-option branch January 23, 2019 12:42
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

Successfully merging this pull request may close these issues.

3 participants