-
Notifications
You must be signed in to change notification settings - Fork 861
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
Fixed BW measurement. Prevented from measuring between non-monotonic or rexmitted packets. #938
Fixed BW measurement. Prevented from measuring between non-monotonic or rexmitted packets. #938
Conversation
…otonic or rexmitted packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the code is perfect except for one condition might not be handled well.
Say packet A is (pkt.m_iSeqNo & PUMASK_SEQNO_PROBE) == 0
Packet B is (pkt.m_iSeqNo & PUMASK_SEQNO_PROBE) == 1
Process the following order of receiving:
Packet A - original
Packet A - re-transmitted
Packet B - original
In this case we can't consider packet B as a probing packet.
srtcore/window.h
Outdated
if ( // probe1Arrival wasn't called yet, no start point then | ||
m_Probe1Sequence == -1 | ||
// not very next towards lately recorded 16th | ||
|| CSeqNo::incseq(m_Probe1Sequence) != pkt.m_iSeqNo | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened with formatting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to somehow add comments by //
to the particular condition being tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the comments out of the if() statement. It is not very hard to reword the comment so that it can correlate to relevant parts of the conditions within the if().
srtcore/window.h
Outdated
if ( // probe1Arrival wasn't called yet, no start point then | ||
m_Probe1Sequence == -1 | ||
// not very next towards lately recorded 16th | ||
|| CSeqNo::incseq(m_Probe1Sequence) != pkt.m_iSeqNo | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move the comments out of the if() statement. It is not very hard to reword the comment so that it can correlate to relevant parts of the conditions within the if().
The original bandwidth measurement states that 16th and 17th packets in order are sent without delay between one another so that the difference in arrival time between 17th and 16th packet in order can suggest the highest possible potential sender speed, which is the absolute maximum link bandwidth.
This measurement is completely blown, however, in cases when:
Even though the bandwidth measurement is prepared to eliminate those values as too much differing to the average, relying on that can be slick, especially if the original state is such that no measurement has been taken yet, or when momentarily the gap between 16th and 17th happens to be occasionally extremely big and therefore an "out of the blue" measurement doesn't seem to be so distant to the valid values.
This fix simply prevents taking any measurements that would not be conducted on exactly two consecutive 16th and 17th packets in order.