|
From: | Xun Chen |
Subject: | Re: [lwip-users] Retransmit too quick? |
Date: | Wed, 08 Jul 2015 11:26:49 -0400 |
User-agent: | Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Hi Sergio,
Per your suggestion, I took a closer look at the port and my codes I am on TiVa/lwip platform. 1) The timer seems to work fine, sys_now() returns correct ms counts (I can't rule out the hardware induced glitch due to TI design flaw). So I don't understand why calling sys_check_timeouts without any delay yields a poorer performance than calling it or tcp_tmr at 250ms pace. 2) I read http://lwip.wikia.com/wiki/Raw/TCP and the example https://github.com/MCUapps/lwip-gnu/blob/master/STM32F4DIS-BB/tcp_echo_server/src/tcp_echoserver.c again. I think tcp_sent callback is only an option, not a requirement, in lwip. Thanks for your help! Chen On 7/7/2015 12:00 PM, address@hidden wrote: ------------------------------ Message: 5 Date: Mon, 06 Jul 2015 17:13:34 -0300 From: "Sergio R. Caprile" <address@hidden> To: address@hidden Subject: Re: [lwip-users] Retransmit too quick? Message-ID: <address@hidden> Content-Type: text/plain; charset=utf-8 Again, you should check how you are handling timers in your port. sys_check_timeouts() needs a consistent time base, it expects you provide a sys_now() function which returns time in milliseconds. You should call sys_check_timeouts() from your main loop as frequently as possible so it does its jobs, it will take care of time by using sys_now(). Sorry, I can't check/follow your code, you should send the first block when you need it and following blocks will be sent via the tcp_sent() callback, check the examples. And, you should not be freeing pbufs the way you are doing in echo_recv(), please check the examples and the wiki http://lwip.wikia.com/wiki/Raw/TCP ------------------------------ _______________________________________________ lwip-users mailing list address@hidden https://lists.nongnu.org/mailman/listinfo/lwip-users End of lwip-users Digest, Vol 143, Issue 6 ****************************************** |
[Prev in Thread] | Current Thread | [Next in Thread] |