Bryan W4WMT wrote:w-u-2-o wrote:And finally...
Capture.JPG
The dreaded "repeated" packet, aka a "rewind" packet!
Any clue as to what kind of network hijinks can cause something like that Scott???
73
The best I can do is re-post Warren's notes from back in Dec 1017. Mind you that this describes a situation and a solution for PowerSDR, not necessarily Thetis, but as the root cause is apparently external to both programs it is likely both programs are susceptible to a greater or lesser degree:
The packet reordering software came about because Manfred, XQ6FOD, collected some data indicating that received packets were occasionally not being processed in the PowerSDR software in the same order that they arrived on the network. I was able to quickly determine that the problem was in the Windows networking software. I don't know if the Windows programmers consider this a bug or a feature; however, what seems to happen is that when more than one packet has been buffered in the Windows software, the most recently received packet is sometimes given to the PowerSDR software first, followed by the older packets. In other words, Windows is not always applying a FIFO (first-in first-out) ordering.
At this point, there were two alternatives: (1) write some simple software to check the order of packets delivered to PowerSDR and reorder them if the ordering is not correct, or (2) explore software such as WinPcap to bypass the Windows network software. None of the programmers has had time to explore (2) in depth, and, I suspect that would lead to some new challenges. So, I wrote some simple software to take approach (1).
It is easy to check the order of the packets since each includes a "sequence number". Re-ordering does add some minimal latency. For example, consider a situation where let's say four packets (0, 1, 2, 3) have arrived at the computer but Windows returns them in the order 3, 0, 1, 2. When the packet re-ordering software sees packet 3, it must buffer it and pass along packets 0, 1, and 2, before it passes along 3. Therefore, we have to add a latency of one packet to be able to correct for one out-of-order packet. Similarly, if we want to correct for multiple out-of-order packets within a certain window of time, we much increase the latency more. This is the reason there is a Latency control in Setup. I'm not sure it ever needs to be set to greater than 1; however, the control is there so we can get some feedback from users and learn about this.
Here are a few other comments about packet reordering:
* It works only for incoming (receive) packets. I do not know if the problem is occurring for "outbound" packets, TX I/Q data and audio. The PowerSDR software has no way to know if those packets are appearing on the network in the same order that they are being sent to Windows. However, IF this is occurring, it could be corrected in the FPGA code by checking the sequence numbers of the outbound packets and reordering appropriately.
* This does NOT fix ALL dropout problems -- they can occur for many reasons when the computer does not have sufficient processing power or when other issues in the system are causing Deferred Procedure Calls. That said, some operators have reported a significant reduction in dropouts from the reordering software.