diff options
author | jlemon <jlemon@FreeBSD.org> | 2000-11-04 15:59:39 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2000-11-04 15:59:39 +0000 |
commit | 88c9bb192d76c158c5305370ae34d645b4a06069 (patch) | |
tree | bb85ba5d6877ae426899cabf9e21d79c58129660 /sys/netinet | |
parent | 048bdff41c996b7ebd1b376dcb8e59063c10d506 (diff) | |
download | FreeBSD-src-88c9bb192d76c158c5305370ae34d645b4a06069.zip FreeBSD-src-88c9bb192d76c158c5305370ae34d645b4a06069.tar.gz |
tp->snd_recover is part of the New Reno recovery algorithm, and should
only be checked if the system is currently performing New Reno style
fast recovery. However, this value was being checked regardless of the
NR state, with the end result being that the congestion window was never
opened.
Change the logic to check t_dupack instead; the only code path that
allows it to be nonzero at this point is NewReno, so if it is nonzero,
we are in fast recovery mode and should not touch the congestion window.
Tested by: phk
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 7 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index f49a7f4..1f7d0fb 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1935,7 +1935,12 @@ process_ACK: if (cw > tp->snd_ssthresh) incr = incr * incr / cw; - if (tcp_do_newreno == 0 || SEQ_GEQ(th->th_ack, tp->snd_recover)) + /* + * If t_dupacks != 0 here, it indicates that we are still + * in NewReno fast recovery mode, so we leave the congestion + * window alone. + */ + if (tcp_do_newreno == 0 || tp->t_dupacks == 0) tp->snd_cwnd = min(cw + incr,TCP_MAXWIN<<tp->snd_scale); } if (acked > so->so_snd.sb_cc) { diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index f49a7f4..1f7d0fb 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -1935,7 +1935,12 @@ process_ACK: if (cw > tp->snd_ssthresh) incr = incr * incr / cw; - if (tcp_do_newreno == 0 || SEQ_GEQ(th->th_ack, tp->snd_recover)) + /* + * If t_dupacks != 0 here, it indicates that we are still + * in NewReno fast recovery mode, so we leave the congestion + * window alone. + */ + if (tcp_do_newreno == 0 || tp->t_dupacks == 0) tp->snd_cwnd = min(cw + incr,TCP_MAXWIN<<tp->snd_scale); } if (acked > so->so_snd.sb_cc) { |