12-02-2020 01:55 AM
we build freertos lwIP UDP Perf client example to test, but it always lost the first hundreds of packets
the device is zynq7020, it is giga ethernet.
12-02-2020 09:17 AM
I don't know if it your issue but I can tell you a similar behavior we faced when streaming 1Gb/s in UDP.
UDP has no back pressure. The receiver side has no way to know whether there won't be any UPd traffic in the coming hours or if it will suddently face a 1GB/s datastream. At the time we had such a system, Linux or Windows didn't took any conservative measure (because it would have reserved precious memory resources maybe for nothing) and relied on the incoming traffic to react and adapt the resources allocated to the TCP/IP stack. In particular the amount of memory buffers in the scatter-gather of the DMA. Therefore it missed the first packets, noticed there was an incoming 1Gb/s datastream, allocated dynamically more buffers, then received the remaining packets without any lost.
To prevent this initial loss we had to tweak the TCP/IP parameters which is network card dependent and in particular the amount of memory buffer allocated by default.
Hope it helps.
12-02-2020 10:31 AM
12-02-2020 11:40 AM
I partially disagree with you.
It is true if you have in mind end to end connection through a bunch of switches. But there is a lot of professional systems relying on UDP for transferring a lot of data without any loss. Indeed, given that a professional switch can have 24 or 48 x 1GbE/10GbE to connect ethernet endpoints in a point-to-point fashion, you can have a system with as many as 24/48 agents - which is already quite a lot for many professional apps - talking to each other full speed in UDP. I can tell you that you can dispatch several 4x1GbE streams to many compute servers w/o any data loss other such a switch.
So you can't only think in terms of protocol, you also have to take the network (and its elements) in considerations.
12-02-2020 06:35 PM
12-02-2020 11:31 PM
It depends also how you connect the different pieces of your system to each other. Is the board directly connected to the computer? is it connected through a cheap NetGear-like switch or is it connected through a professional grade switch? is it the only traffic through the switch? to the desktop? But I can ensure you that if you can control the overall network architecture, you can stream UDP full-speed without any loss and sometimes even without any reordering.
12-03-2020 02:12 AM
12-03-2020 02:37 AM
10 years doing what I described. Massive parallel appliance. N times 1Gb/s. 24/24, 7/7. No packet loss.
Packet losses occur in switches and nics because of resource contention.
If you control your system, you can do it. If you can't control it, then it is indeed unreliable.
12-03-2020 02:41 AM