Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2018 20:02:06 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r334731 - stable/11/sys/netinet
Message-ID:  <201806062002.w56K261O011510@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Wed Jun  6 20:02:05 2018
New Revision: 334731
URL: https://svnweb.freebsd.org/changeset/base/334731

Log:
  MFC r334497:
  
  Limit the retransmission timer for SYN-ACKs by TCPTV_REXMTMAX.
  
  Use the same logic to handle the SYN-ACK retransmission when sent from
  the syn cache code as when sent from the main code.
  
  Sponsored by:	Netflix, Inc.

Modified:
  stable/11/sys/netinet/tcp_syncache.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_syncache.c
==============================================================================
--- stable/11/sys/netinet/tcp_syncache.c	Wed Jun  6 20:00:21 2018	(r334730)
+++ stable/11/sys/netinet/tcp_syncache.c	Wed Jun  6 20:02:05 2018	(r334731)
@@ -407,8 +407,14 @@ syncache_drop(struct syncache *sc, struct syncache_hea
 static void
 syncache_timeout(struct syncache *sc, struct syncache_head *sch, int docallout)
 {
-	sc->sc_rxttime = ticks +
-		TCPTV_RTOBASE * (tcp_syn_backoff[sc->sc_rxmits]);
+	int rexmt;
+
+	if (sc->sc_rxmits == 0)
+		rexmt = TCPTV_RTOBASE;
+	else
+		TCPT_RANGESET(rexmt, TCPTV_RTOBASE * tcp_syn_backoff[sc->sc_rxmits],
+		    tcp_rexmit_min, TCPTV_REXMTMAX);
+	sc->sc_rxttime = ticks + rexmt;
 	sc->sc_rxmits++;
 	if (TSTMP_LT(sc->sc_rxttime, sch->sch_nextc)) {
 		sch->sch_nextc = sc->sc_rxttime;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806062002.w56K261O011510>