svn commit: r218039 - head/sys/netinet
Randall Stewart
rrs at FreeBSD.org
Fri Jan 28 21:05:22 UTC 2011
Author: rrs
Date: Fri Jan 28 21:05:21 2011
New Revision: 218039
URL: http://svn.freebsd.org/changeset/base/218039
Log:
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.
MFC after: 1 week
Modified:
head/sys/netinet/sctp_structs.h
head/sys/netinet/sctputil.c
Modified: head/sys/netinet/sctp_structs.h
==============================================================================
--- head/sys/netinet/sctp_structs.h Fri Jan 28 21:03:32 2011 (r218038)
+++ head/sys/netinet/sctp_structs.h Fri Jan 28 21:05:21 2011 (r218039)
@@ -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: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Fri Jan 28 21:03:32 2011 (r218038)
+++ head/sys/netinet/sctputil.c Fri Jan 28 21:05:21 2011 (r218039)
@@ -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;
More information about the svn-src-head
mailing list