|
From: | Jonathan Larmour |
Subject: | Re: [lwip-users] losing input packets and repeated acks |
Date: | Sat, 13 Jan 2007 02:31:34 +0000 |
User-agent: | Mozilla Thunderbird 1.0.8-1.1.fc3.4.legacy (X11/20060515) |
Carl D. Blake wrote:
I'm having a problem with the input side of TCP. I am receiving a fairly large amount of data (approximately 1 megabyte). Periodically, (about every 50,000 to 160,000 bytes) the transfer hangs. The transmitter is waiting for an ack from my lwip device and keeps retrying a packet. Several seconds later my lwip device suddenly responds with several acks of a packet that has already been acked. I've seen the system do this for up to 15 seconds before my lwip device finally acks the packet that is being retried. After that the transmission proceeds normally for another 50,000 to 160,000 bytes and then it happens again.
I have found it very useful to enable LWIP_STATS in lwipopts.h, and in my debugger print out the lwip_stats structure, and see which reports errors, particularly memory errors from mem, memp or pbuf allocations. That usually points to the culprit.
If you want to print the stats manually in your program you can enable LWIP_STATS_DISPLAY, #include "lwip/stats.h", and call stats_display(); Assuming your LWIP_PLATFORM_DIAG macro is set in your port to something appropriate anyway.
Jifl -- eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts Company legal info, address and number: http://www.ecoscentric.com/legal ------["The best things in life aren't things."]------ Opinions==mine
[Prev in Thread] | Current Thread | [Next in Thread] |