Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2018 19:56:53 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340777 - head/sys/netinet/tcp_stacks
Message-ID:  <201811221956.wAMJurMK083876@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Nov 22 19:56:52 2018
New Revision: 340777
URL: https://svnweb.freebsd.org/changeset/base/340777

Log:
  Ensure that the default RTT stack can make an RTT measurement if
  the TCP connection was initiated using the RACK stack, but the
  peer does not support the TCP RACK extension.
  
  This ensures that the TCP behaviour on the wire is the same if
  the TCP connection is initated using the RACK stack or the default
  stack.
  
  Reviewed by:		rrs@
  MFC after:		1 week
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D18032

Modified:
  head/sys/netinet/tcp_stacks/rack.c

Modified: head/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- head/sys/netinet/tcp_stacks/rack.c	Thu Nov 22 19:56:51 2018	(r340776)
+++ head/sys/netinet/tcp_stacks/rack.c	Thu Nov 22 19:56:52 2018	(r340777)
@@ -8493,9 +8493,7 @@ out:
 	    pass, rsm);
 	if ((tp->t_flags & TF_FORCEDATA) == 0 ||
 	    (rack->rc_in_persist == 0)) {
-#ifdef NETFLIX_STATS
 		tcp_seq startseq = tp->snd_nxt;
-#endif
 
 		/*
 		 * Advance snd_nxt over sequence space of this segment.
@@ -8527,6 +8525,17 @@ out:
 				tp->t_acktime = ticks;
 			}
 			tp->snd_max = tp->snd_nxt;
+			/*
+			 * Time this transmission if not a retransmission and
+			 * not currently timing anything.
+			 * This is only relevant in case of switching back to
+			 * the base stack.
+			 */
+			if (tp->t_rtttime == 0) {
+				tp->t_rtttime = ticks;
+				tp->t_rtseq = startseq;
+				TCPSTAT_INC(tcps_segstimed);
+			}
 #ifdef NETFLIX_STATS
 			if (!(tp->t_flags & TF_GPUTINPROG) && len) {
 				tp->t_flags |= TF_GPUTINPROG;



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