Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 24339

LWIP BF536 LAN8720 RTP/UDP Packet drop?

$
0
0

Hi there,

 

I have a problem with my lwip application which i'm struggling to explain.

 

During our feasability study we wanted to make sure that we could receive up to 9 simultaneous RTP streams of G711 u-law RTP at a rate of 10ms per packet (80 byte payload, 12 byte header), and transmit a single stream outbound. This I achieved but I used a single UDP multicast socket on the receive side to receive all 9 streams.

 

What I need to do now is receive 9 streams on seperate UDP sockets instead of on a single socket.

 

If I create two seperate UDP sockets and start listening for RTP over multicast I can receive two streams without issue. If I create a third UDP socket, I get packet drop. I've confirmed this by checking the seq value of each packet stream to make sure that the expected RTP packet has arrived at my socket.

 

Now, if I change the packet rate at the sender to transmit at a rate of 20ms per packet (160byte payload, 12 byte header), I can now receive four streams without issue. Same amount of payload data, half the number of packets, slightly less header. I then get packet loss on the 5th stream as before. If I double the tx payload again to 40ms per packet (320 byte payload, 12 byte header) the apparent limit doubles again to eight sockets/streams. A ninth socket causes packet drop to occur.

 

My sockets first check for data using the select function then call recv if there is something there. I can see that the sockets sometimes timeout waiting for data, so the application definitely has idle time to use.

 

What I can't understand is why the exact same 9 streams sent to a single socket works ok but does not work when received by 9 seperate sockets.

 

My suspicion is currently that there is a problem within either the DMA or the lwip stack itself which is throttling multiple socket reads, but I don't have much of an understanding of how the stack functions right now so that is a guess at best. I am going to investigate this problem in earnest on Monday but I would appreciate some help in the meantime if anyone has any thoughts or ideas?

 

Cheers,
Adam.


Viewing all articles
Browse latest Browse all 24339

Trending Articles