-
Notifications
You must be signed in to change notification settings - Fork 865
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] fix TTL drop packets #2003
[core] fix TTL drop packets #2003
Conversation
Ok, I made a short review of the code and also looked into the original UDT code since when it remains actually untouched, and you are likely right. The But then - just to be sure - would you be able to make a test where it happens (even with your fixed version) with added logs that would display:
The logs are there already actually, the need is only to add data being displayed in them. In this, for example:
it's just about adding the first found sequence (need to store in a temporary variable) and the last sequence ( |
added
already have this?
|
Should I run a test with the fixed version and then post the heavy log to you? |
If you have both, then that's even better. About this second log - you might also add the msglen value to it, just to see one and the other. Note that in order to see only desired logs, you can limit the FAs for the logs (for the SRT applications it will be |
Ah, or course, placing them in the log in this PR is ok, but I rather meant to see the results from the running session with these logs, just to be able to see the numbers. |
https://1drv.ms/u/s!AuaosNlJ5ELxjy0Ld3-GIPtBtipI?e=Eai1pa |
I think something's wrong with these logs. First, the form of the log:
doesn't match what I can see in the sources:
Moreover, |
It's the log without this pr. |
Yes, but this log doesn't contain any information I need to recognize how exactly it works. I need the log with the extra information, can be also with the fix. |
https://1drv.ms/u/s!AuaosNlJ5ELxjy6drMsHmyUob7h9?e=j9TEFe |
Indeed the range of sequences in the sender's drop request was wrong. It didn't result in an obvious issue because the receiver mostly ignores the range of sequences, and drops the packet from its buffer by the message number. Which is another issue: message number is available if the sender is dropping packets by TLL, but not available if retransmission of packets already dropped by the receiver is requested. In the latter case, the sender knows the range of sequences but does not know for sure the message number of missing packets. Added a note in #1910. |
I don't understand why it matters. DROPREQ is being sent anyway with the sequence number. It simply informs the receiver that it cannot request packets earlier than this. And the message can be reconstructed at the receiver side only in case when it has all packets in order since the first until the last message ([PB_FIRST] [PB_SUBSEQUENT] .... [PB_SUBSEQUENT] [PB_LAST] or [PB_SOLO] as a single packet). If the message cannot be reconstructed according to these rules, it should be wholly dropped at the receiver side. Sender doesn't need to know the message numbers, receiver does. Sender may need the numbers to identify what packets belong to a message, but only as long as they are still in the buffer. Note that it is also predicted that ACK cannot mark the position "in half of the message". |
Two more issues remaining:
const int offset = CSeqNo::seqoff(m_iSndLastDataAck, w_packet.m_iSeqNo);
if (offset < 0)
{
// (...)
seqpair[1] = m_iSndLastDataAck; // this is the first sequence present in the beffer, should be deseq. |
I can see a kinda different problem. This line shows sending DROPREQ with sequence numbers, but msgno=0 (as it's unknown). But |
Exactly what is written in the comment above:
|
What I wanted to point out is that the problem isn't with unavailability of the message number, but with the wrong interpretation of this message. |
The range pair of
UMSG_DROPREQ
should be[low, high]
instead of[low, high)
, right?The previous code always make
m_iSndCurrSeqNo
bigger than the largest msg sent, then cause other problems.