mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-19 23:12:09 +00:00
tcp: use TCP_WND_INC for dupack > 3 case
TCP_WND_INC abstracts the rollover handling and allows the window to reach it's maximum value
This commit is contained in:
parent
b8a3cf3a4a
commit
3d82155d29
@ -1168,11 +1168,8 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
++pcb->dupacks;
|
++pcb->dupacks;
|
||||||
}
|
}
|
||||||
if (pcb->dupacks > 3) {
|
if (pcb->dupacks > 3) {
|
||||||
/* Inflate the congestion window, but not if it means that
|
/* Inflate the congestion window */
|
||||||
the value overflows. */
|
TCP_WND_INC(pcb->cwnd, pcb->mss);
|
||||||
if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) {
|
|
||||||
pcb->cwnd = (tcpwnd_size_t)(pcb->cwnd + pcb->mss);
|
|
||||||
}
|
|
||||||
} else if (pcb->dupacks >= 3) {
|
} else if (pcb->dupacks >= 3) {
|
||||||
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
|
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
|
||||||
tcp_rexmit_fast(pcb);
|
tcp_rexmit_fast(pcb);
|
||||||
|
Loading…
Reference in New Issue
Block a user