tcp/syncache: Use the calculated RTO instead of calculate again
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 11 Apr 2012 14:15:08 +0000 (22:15 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 11 Apr 2012 14:16:45 +0000 (22:16 +0800)
The recalculation actually uses wrong backoff, grrr

sys/netinet/tcp_syncache.c

index 424d2cd..62ba0e7 100644 (file)
@@ -263,10 +263,8 @@ syncache_timeout(struct tcp_syncache_percpu *syncache_percpu,
 
        TAILQ_INSERT_TAIL(&syncache_percpu->timerq[slot], sc, sc_timerq);
        if (!callout_active(&syncache_percpu->tt_timerq[slot])) {
-               callout_reset(&syncache_percpu->tt_timerq[slot],
-                             TCPTV_RTOBASE * tcp_backoff[slot],
-                             syncache_timer,
-                             &syncache_percpu->mrec[slot]);
+               callout_reset(&syncache_percpu->tt_timerq[slot], rto,
+                   syncache_timer, &syncache_percpu->mrec[slot]);
        }
 }