lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] ACK being sent when it shouldn't be


From: sambuddy200471
Subject: [lwip-users] ACK being sent when it shouldn't be
Date: Tue, 28 Apr 2020 03:31:11 -0700 (MST)

Hello,
   I have a product that uses lwip on an stm32 with its built in mac and it
works beautifully. I have now been tasked to move this software over to
another stm32 without a ethernet mac and i will be using a WIZNET 6100 in
macraw mode (so we will be using the wiznet chip purely as an ethernet mac
and phy).
   I have written a driver for this chip to work with lwip and all appears
to be working fine. Lwip initialises, it requests an ip address via DHCP and
gets one and i can also ping it with no problem.
   The problem I am having is. Over a TCP connection, when lwip sends the
client some data [PSH,ACK] in response to a request, the client then sends
back an ACK, lwip promply sends back an ACK to the client acknowledging the
ACK....and then this loop of packet retransmissions and duplicate ACKs
starts to happen.
   This problem does NOT happen on the board with the stm32 and the built in
mac. It only happens on the board with the wiznet chip (and the driver I
have written).
   I have written a tcp echo server to help me debug this problem (as i
originally discovered it on an http server). I have attached packet captures
of it working on the stm32 with the built in mac and a packet capture of it
failing on the stm32 board with the wiznet chip.
   I have traced through lwip and found that the data paths the two boards
take diverge in tcp_receive(). They take diffecernt paths around line 1287
where it tries to work out if it is a duplicate ACK or not. In
tcp_receive(), the working board processes the ACK correctly whereas the
wiznet board goes to "tcp_send_empty_ack(pcb)".
   
   I am at a loss as to what could be causing this. 
   Can anyone suggest what may be going on here or explain a bit about how
the ACK processing works in tcp_receive()?
   I am currently running lwip version STABLE-2.1.2;
   Thanks
   Stuart
    working.pcapng <http://lwip.100.n7.nabble.com/file/t2391/working.pcapng>  
NotWorking.pcapng
<http://lwip.100.n7.nabble.com/file/t2391/NotWorking.pcapng>  



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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