[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging
From: |
Sean Malloy |
Subject: |
[lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd |
Date: |
Mon, 14 Sep 2009 16:25:05 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) Gecko/2009080315 Ubuntu/9.04 (jaunty) Firefox/3.0.13 |
URL:
<http://savannah.nongnu.org/bugs/?27445>
Summary: PCB hangs in Fast Retransmit due to unchanging cwnd
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: smalloy
Submitted on: Mon 14 Sep 2009 04:25:02 PM GMT
Category: TCP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: Other
_______________________________________________________
Details:
I'm running 1.3.1, modified to simulate remote-end packet drops. (There's a
1/1000 chance that I'll drop 3 packets in a row every time *if_output() is
called).
The symptoms:
After a short period of time, communication on the pcb would freeze. The PCB
would show that TF_INFR was set, that the unacked queue was empty, and that
there were several segments present on the unsent queue.
tcp_output was being called on the PCB, but no traffic was going on the wire.
This was because I was failing to enter the while loop around
tcp_do_output_nagle() because cwnd was set to 1*MSS. The unsent queue was
never being drained, and we were dead in the water.
The problem:
RFC2581, Section 3.2, bullet point 3 says:
3. For each additional duplicate ACK received, increment
cwnd by SMSS. This artificially inflates the congestion
window in order to reflect the additional segment that
has left the network.
tcp_receive is structured so that cwnd will not inflate with every duplicate
ACK once a retransmit has been done (that is, once unacked is NULL, and
everything has been moved to the unsent queue with TF_INFR set). If one of
the retransmitted packets is also lost and cwnd is too small for transmission,
cwnd will never grow to the point where lwip will attempt to re-retransmit the
packets on the unsent queue.
Proposed solution
Making the following change to tcp_receive() will cause cwnd to grow with
every duplicate ACK, regardless of whether or not a retransmit has already
been attempted.
I am unsure of the other implications of this change.
770,771c770,771
< if (pcb->dupacks >= 3) {
< if (!(pcb->flags & TF_INFR) && pcb->unacked != NULL) {
---
> if (pcb->dupacks >= 3 && pcb->unacked != NULL) {
> if (!(pcb->flags & TF_INFR)) {
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?27445>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd,
Sean Malloy <=