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

[core] Fixed bonding packet timestamping #1796

Conversation

maxsharabayko
Copy link
Collaborator

A more safe and straightforward fix of the issue with timestamping packets for bonding, compared to #1767.

The proposed fix

Use srctime for all member links, instead of using the srctime value set by the first member link which has successfully sent a packet.

The issue

The source time of a packet is stored as the number of microseconds since the SRT internal clock epoch.
However internal clock accuracy might be higher than 1 μs (e.g. 1 ns).
Therefore, the value returned in MSG_CTRL::src_time may have a lower accuracy compared to the actual time point used to timestamp a packet.
In the case of group sender, in particular, this may result in 1 μs timestamp difference of the same packet, sent over several links. The first link will use internal clock accuracy, while other links will have a μs accuracy of the src_time.

Example:

@485676736: pkt seqno %2131373032 ts=254960 (ts 00:58:28.139419815 [STD], start time 00:58:27.884459430 [STD])
@485676735: pkt seqno %2131373032 ts=254959 (ts 00:58:28.139419000 [STD], start time 00:58:27.884459430 [STD])

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Feb 8, 2021
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Feb 8, 2021
@maxsharabayko maxsharabayko merged commit 2d14df2 into Haivision:master Feb 8, 2021
@maxsharabayko maxsharabayko deleted the hotfix/bonding-timestamps-srctime branch February 8, 2021 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants