[Top][All Lists]

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

[lwip-users] Deadlocked tcp_retransmit due to exceeded pcb->cwnd

From: hajot
Subject: [lwip-users] Deadlocked tcp_retransmit due to exceeded pcb->cwnd
Date: Thu, 24 Jul 2008 19:26:20 +0200


I do transfer over a gprs network with lwip1.3.0. The amount of data is fairly low, around 0.5MB per session. But every third or so session, the transfer stucks.

I encountered that GPRS network very often lose ACK's. However that's not surprising. My MPC555 IC-debugger shows me that retransmission done by calling tcp_output always fail on the test:

/* begin of code snippet */
while (seg != NULL &&
           ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd)


/* end of code snippet */

sequence (seg->tcphdr->seqno) is 107205dec. in this case
lastack is 105774
seg-> len is 1434 yelding a total of 2865bytes

this exceeds the wnd (pcb->cwnd = 1452).

Why does lwip accumulate so much data in the unsent queue? Doesn't it take care of customer mss settings in case whe have lots of retransmissions?

BTW I omitted tcp_output() in the tcp_input() handling, cause lwip would then always transmit just available application data on every ACK it receives. This yelds in very short packets (much shorter than the configured MSS) and drastically decreases GPRS performance due to the high roundtrip delays of the network. Without this workaround I measured 12min. for a 0.2MB transfer. With this workaround I had 1min50secs!
But could this workaround cause the sporadic retransmission stuck!

Regards and thx for help
Hans-Jörg (George) Wagner

reply via email to

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