Revised SND DROP and SND pacing logic #2180
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sending Priority
In the live streaming configuration with TL Packet Drop enabled original packet must have priority over packet retransmission because:
Proposed sending priority (for Live Configuration Only):
Extracted Changes
Prefer Using Source Time if Provided Everywhere (Moved to #2185)
If a source time is provided, it must be considered as the origin time of a message. Meaning that buffer timespan calculation and the TL packet drop logic must rely on this time instead.
Thus there is no need to save two timestamps (
m_tsOriginTime
andm_llSourceTime_us
). Just usem_tsOriginTime
everywhere.Refactored
CUDT::packData()
(Moved to #2229)The logic which extracts an original (not ever sent yet_ packet from the sender buffer has been moved to a dedicated function
CUDT::packUniqueData(..)
. The encryption order has been changed.Fix SND Drop Logic (Moved to #2230)
Sender dropping logic is applied if the sender buffer timespan exceeds
drop_threshold_ms
.Instead, the delay of the oldest packet in the buffer should be used (
Tnow - OldestPacketTS
).This also correlates with the usage of the source time if provided to calculate the timestamp, which was not the case previously.
As before, only packets older than
Tnow - drop_threshold_ms
are dropped by the sender.See issue #898, #1910.
Don't Suppress SND Pacing (Moved to #2232)
Don't allow to force sending if
checkNeedDrop
signals congestion.Addresses #713.