Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Feb 2012 18:58:36 +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-8@freebsd.org
Subject:   svn commit: r231399 - stable/8/sys/netinet
Message-ID:  <201202101858.q1AIwaSd088504@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri Feb 10 18:58:36 2012
New Revision: 231399
URL: http://svn.freebsd.org/changeset/base/231399

Log:
  MFC r218039:
  Keep track of the real last RTT on each net.
  This will be used for Data Center congestion
  control, we won't want to engage it in the
  ECN code unless we KNOW that the RTT is less
  than 500us.
  From rrs@

Modified:
  stable/8/sys/netinet/sctp_structs.h
  stable/8/sys/netinet/sctputil.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/netinet/sctp_structs.h
==============================================================================
--- stable/8/sys/netinet/sctp_structs.h	Fri Feb 10 18:55:50 2012	(r231398)
+++ stable/8/sys/netinet/sctp_structs.h	Fri Feb 10 18:58:36 2012	(r231399)
@@ -266,7 +266,7 @@ struct sctp_nets {
 	uint32_t tos_flowlabel;
 
 	struct timeval start_time;	/* time when this net was created */
-
+	struct timeval last_measured_rtt;
 	uint32_t marked_retrans;/* number or DATA chunks marked for timer
 				 * based retransmissions */
 	uint32_t marked_fastretrans;

Modified: stable/8/sys/netinet/sctputil.c
==============================================================================
--- stable/8/sys/netinet/sctputil.c	Fri Feb 10 18:55:50 2012	(r231398)
+++ stable/8/sys/netinet/sctputil.c	Fri Feb 10 18:58:36 2012	(r231399)
@@ -2500,6 +2500,13 @@ sctp_calculate_rto(struct sctp_tcb *stcb
 	/************************/
 	/* get the current time */
 	(void)SCTP_GETTIME_TIMEVAL(&now);
+
+	/*
+	 * Record the real time of the last RTT for use in DC-CC.
+	 */
+	net->last_measured_rtt = now;
+	timevalsub(&net->last_measured_rtt, old);
+
 	/* compute the RTT value */
 	if ((u_long)now.tv_sec > (u_long)old->tv_sec) {
 		calc_time = ((u_long)now.tv_sec - (u_long)old->tv_sec) * 1000;



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