tcp: Update snd_last upon spurious timeout retransmission restore
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 Apr 2012 08:15:55 +0000 (16:15 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 27 Apr 2012 08:19:50 +0000 (16:19 +0800)
According to RFC4015; mainly to avoid delay spike.

sys/netinet/tcp_timer.c

index a54a43c..8f1f98a 100644 (file)
@@ -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;