AnsweredAssumed Answered

UDP socket send hold/delay

Question asked by ndisher on Feb 8, 2017
Latest reply on Mar 16, 2017 by ndisher

I am writing an application which uses a LWIP UDP socket to stream data to a host. Each packet sent from the application makes a call to "sendto". The data requires an ACK from the host. If the ACK is not received within a timeout (100ms), the packet is retransmitted.

 

I am running into a situation where occasionally a packet is not being sent immediately. My application receives a timeout since the host doesn't receive the packet which triggers a re-transmission. On calling "sendto" for the retransmission, both the original packet and the retransmitted packet are sent back to back (original then retransmitted). I set a flag in the retransmitted packet so I can determine which is which. I am checking the return of "sendto" and there are no errors. I am observing this activity using Wireshark running on the host machine.

 

I am having trouble determining where the packet is being held. Its being queued somewhere since the system still knows to send it. I would expect that if it were a resource issue it would be dropped. There are no stats within LWIP or the supplied GEMAC driver that indicate there is an issue.

 

Can anyone help provide guidance where I can look next to resolve this issue?

 

Just another note that when there is a valid packet drop (due to whatever reason outside of this system), the retransmissions work as intended.

 

I am using the following product versions:
ADSP-SC584 EZ-Board 1.1 BOM 1.6
CCES 2.5.0.0
uCOS-III 2.4.0 - ADI Port
lwIP 2.4.0 - ADI Port

 

Additionally, I found that if I add a 1ms delay between sends that this issue goes away (though unacceptable)

Outcomes