mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +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;
|
||||
}
|
||||
if (pcb->dupacks > 3) {
|
||||
/* Inflate the congestion window, but not if it means that
|
||||
the value overflows. */
|
||||
if ((tcpwnd_size_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) {
|
||||
pcb->cwnd = (tcpwnd_size_t)(pcb->cwnd + pcb->mss);
|
||||
}
|
||||
/* Inflate the congestion window */
|
||||
TCP_WND_INC(pcb->cwnd, pcb->mss);
|
||||
} else if (pcb->dupacks >= 3) {
|
||||
/* Do fast retransmit (checked via TF_INFR, not via dupacks count) */
|
||||
tcp_rexmit_fast(pcb);
|
||||
|
Loading…
Reference in New Issue
Block a user