mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-08 23:44:39 +08:00
Kieran Mansley - 14th July 2004
* Fixed whitespace indenting in parts of tcp_in.c * Changed adjustment of ssthresh in response to fast retransmit * Commented out iteration of unsent list when new ACK received as we no longer put all unacked data on unsent list when retransmitting
This commit is contained in:
parent
8d052ecf24
commit
c356f560e8
@ -709,9 +709,14 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
ntohl(pcb->unacked->tcphdr->seqno)));
|
ntohl(pcb->unacked->tcphdr->seqno)));
|
||||||
tcp_rexmit(pcb);
|
tcp_rexmit(pcb);
|
||||||
/* Set ssthresh to max (FlightSize / 2, 2*SMSS) */
|
/* Set ssthresh to max (FlightSize / 2, 2*SMSS) */
|
||||||
pcb->ssthresh = LWIP_MAX((pcb->snd_max -
|
/*pcb->ssthresh = LWIP_MAX((pcb->snd_max -
|
||||||
pcb->lastack) / 2,
|
pcb->lastack) / 2,
|
||||||
2 * pcb->mss);
|
2 * pcb->mss);*/
|
||||||
|
/* Set ssthresh to half of the minimum of the currenct cwnd and the advertised window */
|
||||||
|
if(pcb->cwnd > pcb->snd_wnd)
|
||||||
|
pcb->ssthresh = pcb->snd_wnd / 2;
|
||||||
|
else
|
||||||
|
pcb->ssthresh = pcb->cwnd / 2;
|
||||||
|
|
||||||
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
|
pcb->cwnd = pcb->ssthresh + 3 * pcb->mss;
|
||||||
pcb->flags |= TF_INFR;
|
pcb->flags |= TF_INFR;
|
||||||
@ -808,6 +813,10 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
rationale is that lwIP puts all outstanding segments on the
|
rationale is that lwIP puts all outstanding segments on the
|
||||||
->unsent list after a retransmission, so these segments may
|
->unsent list after a retransmission, so these segments may
|
||||||
in fact have been sent once. */
|
in fact have been sent once. */
|
||||||
|
/* KJM 13th July 2004
|
||||||
|
I don't think is is necessary as we no longer move all unacked
|
||||||
|
segments on the unsent queue when performing retransmit */
|
||||||
|
/*
|
||||||
while (pcb->unsent != NULL &&
|
while (pcb->unsent != NULL &&
|
||||||
TCP_SEQ_LEQ(ntohl(pcb->unsent->tcphdr->seqno) + TCP_TCPLEN(pcb->unsent),
|
TCP_SEQ_LEQ(ntohl(pcb->unsent->tcphdr->seqno) + TCP_TCPLEN(pcb->unsent),
|
||||||
ackno) &&
|
ackno) &&
|
||||||
@ -832,6 +841,7 @@ tcp_receive(struct tcp_pcb *pcb)
|
|||||||
pcb->snd_nxt = htonl(pcb->unsent->tcphdr->seqno);
|
pcb->snd_nxt = htonl(pcb->unsent->tcphdr->seqno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* End of ACK for new data processing. */
|
/* End of ACK for new data processing. */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user