summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2003-07-15 21:49:53 +0000
committerhsu <hsu@FreeBSD.org>2003-07-15 21:49:53 +0000
commit58acc5cc7759d48d4657b2cebf6cae1b298b4c73 (patch)
tree36d4a503a9c109905df229081f20d0f9c880956b /sys/netinet/tcp_timer.c
parentcb4467d0644178df3985f6ce76adaa8decbecd8a (diff)
downloadFreeBSD-src-58acc5cc7759d48d4657b2cebf6cae1b298b4c73.zip
FreeBSD-src-58acc5cc7759d48d4657b2cebf6cae1b298b4c73.tar.gz
Unify the "send high" and "recover" variables as specified in the
lastest rev of the spec. Use an explicit flag for Fast Recovery. [1] Fix bug with exiting Fast Recovery on a retransmit timeout diagnosed by Lu Guohan. [2] Reviewed by: Thomas Henderson <thomas.r.henderson@boeing.com> Reported and tested by: Lu Guohan <lguohan00@mails.tsinghua.edu.cn> [2] Approved by: Thomas Henderson <thomas.r.henderson@boeing.com>, Sally Floyd <floyd@acm.org> [1]
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 4dfdba4..12b63a5 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -528,7 +528,11 @@ tcp_timer_rexmt(xtp)
*/
tp->snd_cwnd_prev = tp->snd_cwnd;
tp->snd_ssthresh_prev = tp->snd_ssthresh;
- tp->snd_high_prev = tp->snd_high;
+ tp->snd_recover_prev = tp->snd_recover;
+ if (IN_FASTRECOVERY(tp))
+ tp->t_flags |= TF_WASFRECOVERY;
+ else
+ tp->t_flags &= ~TF_WASFRECOVERY;
tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
}
tcpstat.tcps_rexmttimeo++;
@@ -566,7 +570,7 @@ tcp_timer_rexmt(xtp)
tp->t_srtt = 0;
}
tp->snd_nxt = tp->snd_una;
- tp->snd_high = tp->snd_max;
+ tp->snd_recover = tp->snd_max;
/*
* Force a segment to be sent.
*/
@@ -607,6 +611,7 @@ tcp_timer_rexmt(xtp)
tp->snd_ssthresh = win * tp->t_maxseg;
tp->t_dupacks = 0;
}
+ EXIT_FASTRECOVERY(tp);
(void) tcp_output(tp);
out:
OpenPOWER on IntegriCloud