lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #30889] lwIP hangs on sending small packages


From: Karsten Weiss
Subject: [lwip-devel] [bug #30889] lwIP hangs on sending small packages
Date: Tue, 14 Sep 2010 16:43:10 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.12) Gecko/20100824 Firefox/3.5.12 ( .NET CLR 3.5.30729)

Follow-up Comment #2, bug #30889 (project lwip):

Ingo, I've seen the same strange behaviour as you when using the FreeRTOS
port that is provided with the lwIP contrib. It seems to be the Nagle
Algorithm: When sending small amounts of data in short intervals, data is
enqueued to form a potentially bigger data packet to unload the line from
protocol overhead. However, if the queue filled up too quick, I observed an
internal dead-lock of the task. For sockets, you can disable the Nagle
Algorithm by setting the flag "TCP_NODELAY" using 
int on = true;
setsockopt( connection, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof( on
));
There is a similar flag for NETCONN. For my application setting this flag
solved the problem, however, it produces a quite big protocol overhead on the
network when sending single characters in a TCP packet each...
Can you please test the flag with your application and report your results?
BTW: Please check, if your sys timeouts are running properly. It seems, that
the available FreeRTOS port (and I assume that your version is based on it)
does not initialize the timeout struct correctly, if you initialize lwIP from
within a task that has a lower priority than the lwIP task itself (i.e.
sys_thread_new() is executed with a lower priority than that of the task to be
created). See the attached file for a solution. 
Please tell us, if this helped.

(file #21457)
    _______________________________________________________

Additional Item Attachment:

File name: sys_thread_new.c               Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30889>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]