-
Notifications
You must be signed in to change notification settings - Fork 905
[core] Replaced m_iRcvLastSkipAck with m_iRcvLastAck in logs. #2467
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
Conversation
Hmm, |
What about just change this place to
but not change other usages of |
If
Why? |
The old receiver buffer was not handling packet drops properly. There was a chance to re-add a packet that had been already dropped but managed to arrive later. Such a packet must is considered "belated". Here the offset is taken from the latest drop position ( // m_iRcvLastSkipAck is the base sequence number for the receiver buffer.
// This is the offset in the buffer; if this is negative, it means that
// this sequence is already in the past and the buffer is not interested.
// Meaning, this packet will be rejected, even if it could potentially be
// one of missing packets in the transmission.
int32_t offset = CSeqNo::seqoff(m_iRcvLastSkipAck, rpkt.m_iSeqNo); However, the available RCV buffer size must be counted from the first unacknowledged sequence number ( const int avail_bufsize = (int) getAvailRcvBufferSizeNoLock();
if (offset >= avail_bufsize)
return -1;
if (m_pRcvBuffer->insert(u) < 0) So I would say the whole logic of |
If possible, try not to change anything in |
Ah, FYI as per your analysis: |
Maybe just let
|
Also possible. If |
Still, it is incorrect to store a packet if its offset from the last ACK position exceeds the declared buffer size. On the protocol level, the RCV buffer size is tracked from the ACK position. The RCV buffer itself does care about it. |
Got it. Although I think
And I still don't understand
|
What about
|
I'm excited about this news, very looking forward to the new group mode! |
The available RCV buffer size is the protocol-defined value. It is transmitted on the wire from RCV to the sender in the "Available Buffer Size" field of the ACK packet. This value must be calculated from the first unacknowledged seqno ( With a compliant SRT sender and a valid logic of sending the SRT receiver should never receive a data packet outside of the described seqno range. In the example you cite, the start position of the receiver buffer (1iRBufSeqNo |
Got it, thanks for your explanation.
I tried in #2465 |
#2465 is the next in my queue for review 🙂 |
This code block caused many "No room" issues in my production env (group broadcast mode), e.g.
Although it's not a big issue, it would not "No room" forever, but it's still unreasonable to drop these packets: Note that this |
I think the
|
I assume the root issue is that those packets were not supposed to be sent. Given they reach the receiver, and there is space, it might make sense to store them. 🤔 |
#2465 (comment) and #2465 (comment)