[En-Nut-Discussion] UDP queue

Harald Kipp harald.kipp at egnite.de
Thu Mar 24 15:03:48 CET 2005


Hello Hermann,

I just used syslog() for tracing and got 450 UDP
packets per second. Considering that syslog() is
doing much more than your simple loop, I'd assume,
that something makes your code running 100 times
too slow. Or in other words, your 36 buffers should
have been sent in 72 milliseconds at least.

Possible causes:
1. One thread is stealing all CPU power.
2. One of your interrupts is running crazy.
3. Your CPU is not running at 14MHz

Removing Ethernet cable: Nut/Net doesn't handle
this situation correctly. However, it would be
definitely wrong to disconnect established TCP
connections in such cases. It is a feature(!) of TCP
to keep connections even if the physical layer is
broken.

Harald

P.S.: Please post simple text messages only. The mailer
you are using blew up your tiny message to more than 10k!
Please honor, that not all users on this list use
Microsoft products.

At 11:02 24.03.2005 +0100, you wrote:

>
>
>Ethernut 2 with Atmega 128 and the Software 3.9.1. Imagecraft Compiler
>
>
>
>
>
>Hello people,
>
>
>
>have a look at this sample. To transfer 36 buffers by UDP needed
>
>the program almost 7 seconds.
>
>
>
>for(i=1;i<37;i++)
>{
>   sprintf(buf4,"%d Test0123456789", i);
>   len4 = strlen(buf4);
>   if(NutUdpSendTo(udp4_sock, udp4_address,udp4_port,buf4,len4))
>     fputs(" Fehler UDP4 Send\n\r", stSio1);
>}
>
>The PC starts a timer when see ASCII 1 and stopped by ASCII 36   the time 
>is 6965 ms.
>
>How is it possible to send UDP packages faster then 200ms per packages?
>
>I test with Labview Software and dot Net .
>
>
>
>
>
>By the way.
>
>Has no-one removed his network wire for the test yet?
>
>The    stream->so_state == 4 (Established)  is no changed?.
>
>
>
>
>
>regards und many eggs
>
>Hermann Schulz
>
>
>
>
>
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list