svn commit: r341499 - stable/12/sys/netinet/tcp_stacks

Michael Tuexen tuexen at FreeBSD.org
Tue Dec 4 22:11:42 UTC 2018


Author: tuexen
Date: Tue Dec  4 22:11:41 2018
New Revision: 341499
URL: https://svnweb.freebsd.org/changeset/base/341499

Log:
  MFC r340777:
  
  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@
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D18032

Modified:
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- stable/12/sys/netinet/tcp_stacks/rack.c	Tue Dec  4 22:10:09 2018	(r341498)
+++ stable/12/sys/netinet/tcp_stacks/rack.c	Tue Dec  4 22:11:41 2018	(r341499)
@@ -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;


More information about the svn-src-stable-12 mailing list