summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_cc_functions.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-12-18 13:00:11 +0000
committertuexen <tuexen@FreeBSD.org>2016-12-18 13:00:11 +0000
commit6f10afb8c856d41e9e13bde2903586d17acc45ff (patch)
tree7e401647ff6a362d78cb603c2444b69ff6f848f9 /sys/netinet/sctp_cc_functions.c
parent28a78c31ba79641f2924f04562dd5c0769317a15 (diff)
downloadFreeBSD-src-6f10afb8c856d41e9e13bde2903586d17acc45ff.zip
FreeBSD-src-6f10afb8c856d41e9e13bde2903586d17acc45ff.tar.gz
MFC r309607:
Whitespace changes. The tools using to generate the sources has been updated and produces different whitespaces. Commit this seperately to avoid intermixing these with real code changes.
Diffstat (limited to 'sys/netinet/sctp_cc_functions.c')
-rw-r--r--sys/netinet/sctp_cc_functions.c65
1 files changed, 22 insertions, 43 deletions
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c
index d550060..b87ac05 100644
--- a/sys/netinet/sctp_cc_functions.c
+++ b/sys/netinet/sctp_cc_functions.c
@@ -160,17 +160,13 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb,
uint32_t srtt;
srtt = net->lastsa;
- /*
- * lastsa>>3; we don't need
- * to devide ...
- */
+ /* lastsa>>3; we don't need
+ * to devide ... */
if (srtt == 0) {
srtt = 1;
}
- /*
- * Short Version => Equal to
- * Contel Version MBe
- */
+ /* Short Version => Equal to
+ * Contel Version MBe */
net->ssthresh = (uint32_t) (((uint64_t) 4 *
(uint64_t) net->mtu *
(uint64_t) net->cwnd) /
@@ -405,10 +401,8 @@ cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint6
net->flight_size,
probepoint);
if (net->cc_mod.rtcc.ret_from_eq) {
- /*
- * Switch over to CA if we are less
- * aggressive
- */
+ /* Switch over to CA if we are less
+ * aggressive */
net->ssthresh = net->cwnd - 1;
net->partial_bytes_acked = 0;
}
@@ -784,9 +778,9 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
/*
* At this point our bw_bytes has been updated by
* incoming sack information.
- *
+ *
* But our bw may not yet be set.
- *
+ *
*/
if ((net->cc_mod.rtcc.new_tot_time / 1000) > 0) {
nbw = net->cc_mod.rtcc.bw_bytes / (net->cc_mod.rtcc.new_tot_time / 1000);
@@ -851,10 +845,8 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
}
break;
case SCTP_CMT_RPV2:
- /*
- * lastsa>>3; we don't need
- * to divide ...
- */
+ /* lastsa>>3; we don't need
+ * to divide ... */
srtt = net->lastsa;
if (srtt == 0) {
srtt = 1;
@@ -938,10 +930,8 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
}
break;
case SCTP_CMT_RPV2:
- /*
- * lastsa>>3; we don't need
- * to divide ...
- */
+ /* lastsa>>3; we don't need
+ * to divide ... */
srtt = net->lastsa;
if (srtt == 0) {
srtt = 1;
@@ -1108,10 +1098,8 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb *stcb, struct sctp_nets *
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
}
} else {
- /*
- * Further tuning down required over the drastic
- * original cut
- */
+ /* Further tuning down required over the drastic
+ * original cut */
net->ssthresh -= (net->mtu * num_pkt_lost);
net->cwnd -= (net->mtu * num_pkt_lost);
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
@@ -1125,10 +1113,8 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb *stcb, struct sctp_nets *
net->ssthresh = net->cwnd / 2;
if (net->ssthresh < net->mtu) {
net->ssthresh = net->mtu;
- /*
- * here back off the timer as well, to slow
- * us down
- */
+ /* here back off the timer as well, to slow
+ * us down */
net->RTO <<= 1;
}
net->cwnd = net->ssthresh;
@@ -1375,10 +1361,8 @@ sctp_cwnd_new_rtcc_transmission_begins(struct sctp_tcb *stcb,
cwnd_in_mtu = SCTP_BASE_SYSCTL(sctp_initial_cwnd);
if (cwnd_in_mtu == 0) {
- /*
- * Using 0 means that the value of RFC 4960
- * is used.
- */
+ /* Using 0 means that the value of RFC 4960
+ * is used. */
cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND));
} else {
/*
@@ -1390,10 +1374,8 @@ sctp_cwnd_new_rtcc_transmission_begins(struct sctp_tcb *stcb,
cwnd = (net->mtu - sizeof(struct sctphdr)) * cwnd_in_mtu;
}
if (net->cwnd > cwnd) {
- /*
- * Only set if we are not a timeout (i.e.
- * down to 1 mtu)
- */
+ /* Only set if we are not a timeout (i.e.
+ * down to 1 mtu) */
net->cwnd = cwnd;
}
}
@@ -2023,10 +2005,8 @@ htcp_param_update(struct sctp_nets *net)
htcp_beta_update(&net->cc_mod.htcp_ca, minRTT, maxRTT);
htcp_alpha_update(&net->cc_mod.htcp_ca);
- /*
- * add slowly fading memory for maxRTT to accommodate routing
- * changes etc
- */
+ /* add slowly fading memory for maxRTT to accommodate routing
+ * changes etc */
if (minRTT > 0 && maxRTT > minRTT)
net->cc_mod.htcp_ca.maxRTT = minRTT + ((maxRTT - minRTT) * 95) / 100;
}
@@ -2109,7 +2089,6 @@ htcp_min_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net)
{
return (net->ssthresh);
}
-
#endif
static void
OpenPOWER on IntegriCloud