From df95e230300d297fb561cc768dff7c36b51c8fea Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 27 Apr 2012 16:15:55 +0800 Subject: [PATCH] tcp: Update snd_last upon spurious timeout retransmission restore According to RFC4015; mainly to avoid delay spike. --- sys/netinet/tcp_timer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index a54a43c3e5..8f1f98a07d 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -483,8 +483,10 @@ tcp_revert_congestion_state(struct tcpcb *tp) ++tcpstat.tcps_sndfastrexmitbad; if (tp->t_flags & TF_EARLYREXMT) ++tcpstat.tcps_sndearlyrexmitbad; - } else + } else { ++tcpstat.tcps_sndrtobad; + tp->snd_last = ticks; + } tp->t_badrxtwin = 0; tp->t_rxtshift = 0; tp->snd_nxt = tp->snd_max; -- 2.41.0