[Top][All Lists]

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

[lwip-users] TCP Dup ACKs and TCP Window full

From: Adrian Figueroa
Subject: [lwip-users] TCP Dup ACKs and TCP Window full
Date: Fri, 6 Apr 2018 13:30:35 +0000



I am writing a bootloader application that receives data over ethernet for flashing the processor it runs on. This is implemented on an STM32F746 running the ChibiOS-RTOS and the HAL drivers that come with it. Consequently, the netconn-api is used. I run Lwip 1.4.1, because Lwip 2.X was not yet ported to ChibiOS and I cannot to do it myself.


Lwip is used to implement a simple TCP server. A python TCP client connects to it and sends a chunk of data (around 200k).


I moved Lwip pools and heap to external SDRAM, so I can store large amounts of packets without discarding them.


First, the TCP server thread waits for an incoming connection with “netconn_accept()”. Find this in “server.c”, attached to this mail. There is also a “helper” thread that cleans things up after a connection was closed (dynamic threads).


After “netconn_accept()”, the netconn is handed over to a thread that receives data. Find the receiver functionality in “receiver.c”.


The receiver constantly calls netconn_recv(), until the connection is closed. A netbuf is filled each time and chained to the previous netbuf. I also have an evaluation thread that works on the received netbufs, but it does not do anything at the moment. In the end, I have a long netbuf chain in memory, ready for evaluation.


The problem is that I lose some of the packets in the process. Find the dump from Wireshark attached. My lwipopts.h is also included in the mail. I chose very generous amounts of storage for all pools, because I have 32 MB of SDRAM available. I get no errors at all in lwip_stats.


Do you have any suggestions?


Thank you in advance,






Attachment: server.c
Description: Text document

Attachment: receiver.c
Description: Text document

Attachment: dump_long.pcapng
Description: Binary data

Attachment: lwipopts.h
Description: Text document

Attachment: smime.p7s
Description: S/MIME cryptographic signature

reply via email to

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