From 024fd5b6bb67f4dd77c2adf580ad530b3644d4e4 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Sun, 28 Oct 2012 19:02:07 +0000 Subject: [PATCH] For retransmits of SYN|ACK from the syncache use the slightly more aggressive special tcp_syn_backoff[] retransmit schedule instead of the normal tcp_backoff[] schedule for established connections. MFC after: 2 weeks --- sys/netinet/tcp_syncache.c | 2 +- sys/netinet/tcp_timer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 778e7626dd47..c83945ac9d32 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -391,7 +391,7 @@ static void syncache_timeout(struct syncache *sc, struct syncache_head *sch, int docallout) { sc->sc_rxttime = ticks + - TCPTV_RTOBASE * (tcp_backoff[sc->sc_rxmits]); + TCPTV_RTOBASE * (tcp_syn_backoff[sc->sc_rxmits]); sc->sc_rxmits++; if (TSTMP_LT(sc->sc_rxttime, sch->sch_nextc)) { sch->sch_nextc = sc->sc_rxttime; diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index 2fc8f7b99d0f..dc7f172a8c55 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -170,6 +170,7 @@ extern int tcp_rexmit_slop; extern int tcp_msl; extern int tcp_ttl; /* time to live for TCP segs */ extern int tcp_backoff[]; +extern int tcp_syn_backoff[]; extern int tcp_finwait2_timeout; extern int tcp_fast_finwait2_recycle;