[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: |
Kieran Mansley |
Subject: |
[lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd |
Date: |
Fri, 23 Oct 2009 15:51:53 +0000 |
User-agent: |
Opera/9.80 (X11; Linux i686; U; en) Presto/2.2.15 Version/10.00 |
Follow-up Comment #3, bug #27445 (project lwip):
OK, combining the fix for this and bug #27329 was not as trivial as I hoped.
I've ended up with that bit of code reading as follows:
if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){
++pcb->dupacks;
if (pcb->dupacks >= 3) {
if (!(pcb->flags & TF_INFR) && pcb->unacked != NULL) {
/* This is fast retransmit. Retransmit the first unacked segment.
*/
LWIP_DEBUGF(TCP_FR_DEBUG, ("tcp_receive: dupacks %"U16_F"
(%"U32_F"), fast retransmit %"U32_F"n",
(u16_t)pcb->dupacks, pcb->lastack,
ntohl(pcb->unacked->tcphdr->seqno)));
tcp_rexmit(pcb);
/* Set ssthresh to max (FlightSize / 2, 2*SMSS) */
/*pcb->ssthresh = LWIP_MAX((pcb->snd_max -
pcb->lastack) / 2,
2 * pcb->mss);*/
/* Set ssthresh to half of the minimum of the current cwnd and
the advertised window */
if (pcb->cwnd > pcb->snd_wnd)
pcb->ssthresh = pcb->snd_wnd / 2;
else
pcb->ssthresh = pcb->cwnd / 2;
/* The minimum value for ssthresh should be 2 MSS */
if (pcb->ssthresh < 2*pcb->mss) {
LWIP_DEBUGF(TCP_FR_DEBUG, ("tcp_receive: The minimum value for
ssthresh %"U16_F" should be min 2 mss %"U16_F"...n", pcb->ssthresh,
2*pcb->mss));
pcb->ssthresh = 2*pcb->mss;
}
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
pcb->flags |= TF_INFR;
} else {
/* Inflate the congestion window, but not if it means that
the value overflows. */
if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) {
pcb->cwnd += pcb->mss;
}
}
}
if (pcb->unacked == NULL && pcb->unsent == NULL)
pcb->dupacks = 0;
}
Doest that look OK?
_______________________________________________________
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, Kieran Mansley, 2009/10/15
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Simon Goldschmidt, 2009/10/16
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd,
Kieran Mansley <=
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Bill Auerbach, 2009/10/23
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Bill Auerbach, 2009/10/23
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Bill Auerbach, 2009/10/23
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Simon Goldschmidt, 2009/10/23
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Bill Auerbach, 2009/10/23
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Kieran Mansley, 2009/10/28
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Oleg Tyshev, 2009/10/29
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Kieran Mansley, 2009/10/29
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Kieran Mansley, 2009/10/29
- [lwip-devel] [bug #27445] PCB hangs in Fast Retransmit due to unchanging cwnd, Oleg Tyshev, 2009/10/30