svn commit: r340777 - head/sys/netinet/tcp_stacks
Michael Tuexen
tuexen at FreeBSD.org
Thu Nov 22 19:56:53 UTC 2018
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;
More information about the svn-src-all
mailing list