diff options
author | rrs <rrs@FreeBSD.org> | 2011-03-08 11:58:25 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2011-03-08 11:58:25 +0000 |
commit | 1188e1f085e1f0d4b8ae9fe06955b2602b3db10e (patch) | |
tree | 58b9da37b248f4b570b6759db99b2fc405f9a00c /sys/netinet/sctputil.c | |
parent | 4d0733e0f8bd37f600ca86b0f1323a24ed9c7fae (diff) | |
download | FreeBSD-src-1188e1f085e1f0d4b8ae9fe06955b2602b3db10e.zip FreeBSD-src-1188e1f085e1f0d4b8ae9fe06955b2602b3db10e.tar.gz |
Tunes and fixes the new DC-CC to seem to hit the
right mix. Still may need some tweaks but it
appears to almost not give away too much to an
RFC2581 flow, but can really minimize the amount of
buffers used in the net.
MFC after: 3 months
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index a1b3450..ffd131f 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -1370,11 +1370,10 @@ sctp_iterator_worker(void) SCTP_IPI_ITERATOR_WQ_UNLOCK(); CURVNET_SET(it->vn); sctp_iterator_work(it); - + sctp_it_ctl.cur_it = NULL; CURVNET_RESTORE(); SCTP_IPI_ITERATOR_WQ_LOCK(); if (sctp_it_ctl.iterator_flags & SCTP_ITERATOR_MUST_EXIT) { - sctp_it_ctl.cur_it = NULL; break; } /* sa_ignore FREED_MEMORY */ @@ -2469,7 +2468,7 @@ sctp_calculate_rto(struct sctp_tcb *stcb, struct sctp_association *asoc, struct sctp_nets *net, struct timeval *told, - int safe, int local_lan_determine) + int safe, int rtt_from_sack) { /*- * given an association and the starting time of the current RTT @@ -2507,9 +2506,18 @@ sctp_calculate_rto(struct sctp_tcb *stcb, /* computer rtt in ms */ rtt = net->rtt / 1000; - - /* Do we need to determine the lan type? */ - if ((local_lan_determine == SCTP_DETERMINE_LL_OK) && + if ((asoc->cc_functions.sctp_rtt_calculated) && (rtt_from_sack == SCTP_RTT_FROM_DATA)) { + /* + * Tell the CC module that a new update has just occurred + * from a sack + */ + (*asoc->cc_functions.sctp_rtt_calculated) (stcb, net, &now); + } + /* + * Do we need to determine the lan? We do this only on sacks i.e. + * RTT being determined from data not non-data (HB/INIT->INITACK). + */ + if ((rtt_from_sack == SCTP_RTT_FROM_DATA) && (net->lan_type == SCTP_LAN_UNKNOWN)) { if (net->rtt > SCTP_LOCAL_LAN_RTT) { net->lan_type = SCTP_LAN_INTERNET; |