lwIP - A Lightweight TCP/IP stack - Bugs: bug #35015, Lost segments over wireless access...
You are not allowed to post comments on this tracker with your current authentication level.
bug #35015: Lost segments over wireless access point
Submitter: | Brad Benjamin <bradbenj5952> | ||
Submitted: | Thu 08 Dec 2011 04:58:06 PM UTC | ||
Category: | TCP | Severity: | 2 - Minor |
Item Group: | Faulty Behaviour | Status: | Invalid |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 1.4.0 |
Jump to the original submission
Fri 10 Feb 2012 05:05:53 PM UTC, comment #7: |
Brad Benjamin <bradbenj5952> |
Wed 25 Jan 2012 05:32:18 PM UTC, comment #6: It seemed prudent to also post the ethernetif.c port as well which I obtained from a contrib for the STM32F107. |
Brad Benjamin <bradbenj5952> |
Wed 25 Jan 2012 03:18:40 PM UTC, comment #5: The OS I'm using is Rowley's CTL which is part of their CrossStudio development environment. I've attached the sys_arch.c and sys_arch.h porting sources. I am using the C heap for dynamic memory allocation instead of lwIP's memory allocator. I've checked that my exclusion mechanism works properly cross threading and with the Ethernet interrupt (only one execution context gains access to malloc and free at a time). There may be a problem here but I haven't had any success capturing it.
|
Brad Benjamin <bradbenj5952> |
Wed 25 Jan 2012 06:55:26 AM UTC, comment #4: Interesting. Still this looks like a bug in your port. Which port of lwIP are you using? Which OS and netif driver are you using? Did you write the code yourself or using a port written by someone else? |
Simon Goldschmidt <goldsimon> |
Tue 24 Jan 2012 09:45:50 PM UTC, comment #3: Sorry this took so long but I got side tracked to other matters. Anyway, while investigating further I've made some tests that may help reveal what may be going on here. I'll explain my changes and observations and then I'll enable logging as you advised below and report the results in a follow-on comment later.
|
Brad Benjamin <bradbenj5952> |
Mon 19 Dec 2011 05:43:00 PM UTC, comment #2: Waiting for input... -> minor |
Simon Goldschmidt <goldsimon> |
Fri 09 Dec 2011 03:06:43 PM UTC, comment #1: The pcap looks indeed strange: between packets #104 and #106, 519 bytes are missing. However, that's no loss on the wire since packet #104 has the IP-ID 60 and #106 has 61, so lwIP did not send the missing bytes in the first place.
|
Simon Goldschmidt <goldsimon> |
Thu 08 Dec 2011 04:58:06 PM UTC, original submission:
I'm using an OS port, sequential API (netconn), MSS == 536, window is 2 * MSS. Our application has a web server and serves up content from a microSD card. All works very well when browsing over a wired network. However, whenever browsing is attempted using a client which connects via WiFi, lwIP frequently appears to lose segments from which it fails to recover. The net effect of this behavior is that netconn_write() fails to return to the server thread because the op_completed semaphore is never signaled by the TCP core. I've attached a PCAP file which shows a typical session. This scenario is very repeatable. You'll notice in the PCAP trace that there is a lost segment near the session start from which lwIP recovers gracefully, however, later in the session there is another lost segment from which it does not recover.
|
Brad Benjamin <bradbenj5952> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2012-02-11 | goldsimon | Status | Need Info | Invalid | |
Open/Closed | Open | Closed | |||
2012-01-25 | bradbenj5952 | Attached File | - | Added ethernetif.c, #24891 | |
2012-01-25 | bradbenj5952 | Attached File | - | Added sys_arch.c, #24889 | |
Attached File | - | Added sys_arch.h, #24890 | |||
2011-12-19 | goldsimon | Severity | 3 - Normal | 2 - Minor | |
Status | None | Need Info | |||
2011-12-08 | bradbenj5952 | Attached File | - | Added Lost Segments.pcap, #24547 |
Powered by Savane 3.13-02a9.
Corresponding source code
It turns out you were right, as I suspected, it was a bug in our port. The problem was that the netif_add() was passing in a pointer to ethernet_input rather than tcpip_input. The mistake I made was borrowing code from a non-OS implementation and then porting to the OS without making the change to the input handler. Now that the repair has been made, lwIP is working great!