On receiving 3 duplicate acknowledgements, SACK recovery was not being entered correctly.

Fix this problem by separating out the SACK and the newreno cases. Also, check
if we are in FASTRECOVERY for the sack case and if so, turn off dupacks.

Fix an issue where the congestion window was not being incremented by ssthresh.

Thanks to Mohan Srinivasan for finding this problem.
This commit is contained in:
Jayanth Vijayaraghavan 2004-07-01 23:34:06 +00:00
parent 6ff8a07467
commit a0445c2e2c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131427
2 changed files with 40 additions and 14 deletions

View File

@ -1931,12 +1931,25 @@ tcp_input(m, off0)
} else if (tp->t_dupacks == tcprexmtthresh) {
tcp_seq onxt = tp->snd_nxt;
u_int win;
if ((tcp_do_newreno ||
tp->sack_enable) &&
SEQ_LEQ(th->th_ack,
tp->snd_recover)) {
tp->t_dupacks = 0;
break;
/*
* If we're doing sack, check to
* see if we're already in sack
* recovery. If we're not doing sack,
* check to see if we're in newreno
* recovery.
*/
if (tp->sack_enable) {
if (IN_FASTRECOVERY(tp)) {
tp->t_dupacks = 0;
break;
}
} else if (tcp_do_newreno) {
if (SEQ_LEQ(th->th_ack,
tp->snd_recover)) {
tp->t_dupacks = 0;
break;
}
}
win = min(tp->snd_wnd, tp->snd_cwnd) /
2 / tp->t_maxseg;
@ -1953,7 +1966,7 @@ tcp_input(m, off0)
tp->t_maxseg *
tp->t_dupacks;
(void) tcp_output(tp);
tp->snd_cwnd =
tp->snd_cwnd +=
tp->snd_ssthresh;
goto drop;
}

View File

@ -1931,12 +1931,25 @@ tcp_input(m, off0)
} else if (tp->t_dupacks == tcprexmtthresh) {
tcp_seq onxt = tp->snd_nxt;
u_int win;
if ((tcp_do_newreno ||
tp->sack_enable) &&
SEQ_LEQ(th->th_ack,
tp->snd_recover)) {
tp->t_dupacks = 0;
break;
/*
* If we're doing sack, check to
* see if we're already in sack
* recovery. If we're not doing sack,
* check to see if we're in newreno
* recovery.
*/
if (tp->sack_enable) {
if (IN_FASTRECOVERY(tp)) {
tp->t_dupacks = 0;
break;
}
} else if (tcp_do_newreno) {
if (SEQ_LEQ(th->th_ack,
tp->snd_recover)) {
tp->t_dupacks = 0;
break;
}
}
win = min(tp->snd_wnd, tp->snd_cwnd) /
2 / tp->t_maxseg;
@ -1953,7 +1966,7 @@ tcp_input(m, off0)
tp->t_maxseg *
tp->t_dupacks;
(void) tcp_output(tp);
tp->snd_cwnd =
tp->snd_cwnd +=
tp->snd_ssthresh;
goto drop;
}