Get max throughput UDP handling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Get max throughput UDP handling

Mario Luzeiro
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
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Get max throughput UDP handling

Mario Luzeiro
I found this article :)
https://lwip.fandom.com/wiki/Maximizing_throughput

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of Mário Luzeiro <[hidden email]>
Sent: 09 October 2020 10:02
To: [hidden email]
Subject: [lwip-users] Get max throughput UDP handling

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
_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Get max throughput UDP handling

Patrick Klos-2
In reply to this post by Mario Luzeiro
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


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users