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
This commit is contained in:
Randall Stewart 2011-01-28 21:05:21 +00:00
parent f69ddfbb5f
commit 410bcbef0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218039
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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;