|
From: | Patrick Klos |
Subject: | Re: [lwip-users] Get max throughput UDP handling |
Date: | Fri, 9 Oct 2020 07:54:29 -0400 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 |
On 10/9/2020 5:02 AM, Mário Luzeiro wrote:
Hello all, I'm sending UDP messages sequential, at "full speed" from a PC to a MCU (using Lwip) I know I'm loosing some UDP messages (I implemented a sequential counter to debug it) the udp_recv_fn is doing nothing much and exists almost immediately. Is it expecting that I lost packages due the CPU performance? (considering that packages are not lost by other cases) or how do I know if I have enough CPU power that can handle max communication rate? What can I do in LwIP to handle more packages and don't get it lost, any configurations I should look at? Mario
Hi Mario,I presume your MCU's ethernet is 100 Mbps? Is it connected directly to the PC via ethernet or are they both connected to a switch? If a switch, what speed is the PC connection to the switch versus the MCU connection? If the PC is 1 Gbps and the MCU is 100 Mbps, your MCU will never be able to keep up. What percentage of packet loss are you seeing?
How many packets per second (and what size) are you calling "full speed"? I've found the LwIP stack on the Tiva was quite reliable and robust enough to support very high speed reception of UDP packets. I usually queue up the received pbuf's to be processed in the "foreground" for best results (unless your processing of the UDP packets is truly minimal?).
Patrick
[Prev in Thread] | Current Thread | [Next in Thread] |