lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Missing ACKs using LWIP 1.3.2


From: John Hoffman
Subject: Re: [lwip-users] Missing ACKs using LWIP 1.3.2
Date: Tue, 16 Jun 2015 13:36:11 +0000

As a follow up to my own post I believe I have rediscovered a known resolved defect.

As I said we are stuck with 1.3.2 as TI no longer supports LWIP on Stellaris as the Stellaris MCUs are replaced by the TIVA MCUs.

The problem is when the sequence numbers wrap. I found the 1.4 sequence number macros in tcp_impl.h and moved those back to tcp.h in the 1.3.2 code and that resolved the issue.

The confusing thing about all this was that TI created their own macros to work around a compiler defect. We are using IAR so I did not look at this after I saw the workaround comment.

Additionally the wrap was occurring at 2,147,483,648 not 4,294,967,296 due to the use of s_32_t in the macros. Using wire shark I saw the low sequence numbers and did not pursue the wrap condition.

 

 

We are using LWIP 1.3.2(as ported by TexasInstruments), IAR compiler targeting a stellaris MCU.

The TI implementation uses a timer tick interrupt 100 times/sec to service the LWIP stack.  No RTOS involved. Our application code also runs on this same timer tick interrupt so no concurrency issues in play.

 

We implemented a webservice http client over tcp.

Periodically(about 1-2 times per day), we miss ACKs in the application layer. Plain and simple, our tcp_sent callback does not get called. We have timers that expire if the ack is not seen.

I have captured the WireShark trace and the ack is being transmitted. For some reason the lwip stack does not inform the application layer. I don’t know if the LWIP stack sees the ack or not.

 

The odd thing is that under normal load conditions the code works and transmits 2-3 large HTTP posts/second. This means that within a 12 hour period it works 2*60*60 *12= 86,400 times without error.

 

I have adjusted the lwipopts.h settings over and over and nothing seems to affect the problem.

 

I have scanned the 1.4.1 changelog and do not see any defects that specifically address this problem, Further complicating the issue is that TI has not ported 1.4.1. If they had I would have tried it to see if it solves the problem. I am not sure how much effort it will be to do the port myself. I am willing to do it if there is a specific defect that address my issue.

 

 

 

 


reply via email to

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