From 3a4d069b2199e006b818f29a19b3e36a6621f88a Mon Sep 17 00:00:00 2001 From: tuexen Date: Sat, 17 Dec 2011 19:21:40 +0000 Subject: Fix unused parameter warnings. While there, fix some whitespace issues. MFC after: 3 months. --- sys/netinet/sctp_cc_functions.c | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'sys/netinet/sctp_cc_functions.c') diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index b1596cc..52b92b4 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -7,11 +7,11 @@ * modification, are permitted provided that the following conditions are met: * * a) Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. + * this list of conditions and the following disclaimer. * * b) Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the distribution. + * the documentation and/or other materials provided with the distribution. * * c) Neither the name of Cisco Systems, Inc. nor the names of its * contributors may be used to endorse or promote products derived @@ -508,8 +508,7 @@ out_decision: } static int -cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, - uint64_t vtag, uint8_t inst_ind) +cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t vtag) { uint64_t oth, probepoint; @@ -643,7 +642,7 @@ cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw) } bw_offset = net->cc_mod.rtcc.lbw >> bw_shift; if (nbw > net->cc_mod.rtcc.lbw + bw_offset) { - ret = cc_bw_increase(stcb, net, nbw, vtag, inst_ind); + ret = cc_bw_increase(stcb, net, nbw, vtag); goto out; } rtt_offset = net->cc_mod.rtcc.lbw_rtt >> SCTP_BASE_SYSCTL(sctp_rttvar_rtt); @@ -664,7 +663,7 @@ out: static void sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, struct sctp_association *asoc, - int accum_moved, int reneged_all, int will_exit, int use_rtcc) + int accum_moved, int reneged_all SCTP_UNUSED, int will_exit, int use_rtcc) { struct sctp_nets *net; int old_cwnd; @@ -1301,7 +1300,7 @@ sctp_cwnd_update_rtcc_tsn_acknowledged(struct sctp_nets *net, } static void -sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb, +sctp_cwnd_prepare_rtcc_net_for_sack(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net) { if (net->cc_mod.rtcc.tls_needs_set > 0) { @@ -1473,7 +1472,7 @@ sctp_cwnd_rtcc_socket_option(struct sctp_tcb *stcb, int setorget, } static void -sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb, +sctp_cwnd_update_rtcc_packet_transmitted(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net) { if (net->cc_mod.rtcc.tls_needs_set == 0) { @@ -1492,8 +1491,9 @@ sctp_cwnd_update_rtcc_after_sack(struct sctp_tcb *stcb, } static void -sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb, - struct sctp_nets *net, struct timeval *now) +sctp_rtt_rtcc_calculated(struct sctp_tcb *stcb SCTP_UNUSED, + struct sctp_nets *net, + struct timeval *now SCTP_UNUSED) { net->cc_mod.rtcc.rtt_set_this_sack = 1; } @@ -1731,7 +1731,7 @@ sctp_hs_cwnd_update_after_fr(struct sctp_tcb *stcb, static void sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, struct sctp_association *asoc, - int accum_moved, int reneged_all, int will_exit) + int accum_moved, int reneged_all SCTP_UNUSED, int will_exit) { struct sctp_nets *net; @@ -1879,7 +1879,7 @@ htcp_cwnd_undo(struct sctp_tcb *stcb, struct sctp_nets *net) #endif static inline void -measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net) +measure_rtt(struct sctp_nets *net) { uint32_t srtt = net->lastsa >> SCTP_RTT_SHIFT; @@ -1897,7 +1897,7 @@ measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net) } static void -measure_achieved_throughput(struct sctp_tcb *stcb, struct sctp_nets *net) +measure_achieved_throughput(struct sctp_nets *net) { uint32_t now = sctp_get_tick_count(); @@ -1997,7 +1997,7 @@ htcp_alpha_update(struct htcp *ca) * were getting just too full now). */ static void -htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net) +htcp_param_update(struct sctp_nets *net) { uint32_t minRTT = net->cc_mod.htcp_ca.minRTT; uint32_t maxRTT = net->cc_mod.htcp_ca.maxRTT; @@ -2014,9 +2014,9 @@ htcp_param_update(struct sctp_tcb *stcb, struct sctp_nets *net) } static uint32_t -htcp_recalc_ssthresh(struct sctp_tcb *stcb, struct sctp_nets *net) +htcp_recalc_ssthresh(struct sctp_nets *net) { - htcp_param_update(stcb, net); + htcp_param_update(net); return max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu); } @@ -2051,7 +2051,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net) } } } else { - measure_rtt(stcb, net); + measure_rtt(net); /* * In dangerous area, increase slowly. In theory this is @@ -2093,7 +2093,7 @@ htcp_min_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net) #endif static void -htcp_init(struct sctp_tcb *stcb, struct sctp_nets *net) +htcp_init(struct sctp_nets *net) { memset(&net->cc_mod.htcp_ca, 0, sizeof(struct htcp)); net->cc_mod.htcp_ca.alpha = ALPHA_BASE; @@ -2111,7 +2111,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) */ net->cwnd = min((net->mtu * 4), max((2 * net->mtu), SCTP_INITIAL_CWND)); net->ssthresh = stcb->asoc.peers_rwnd; - htcp_init(stcb, net); + htcp_init(net); if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION); @@ -2121,7 +2121,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) static void sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, struct sctp_association *asoc, - int accum_moved, int reneged_all, int will_exit) + int accum_moved, int reneged_all SCTP_UNUSED, int will_exit) { struct sctp_nets *net; @@ -2176,7 +2176,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, if (accum_moved || ((asoc->sctp_cmt_on_off > 0) && net->new_pseudo_cumack)) { htcp_cong_avoid(stcb, net); - measure_achieved_throughput(stcb, net); + measure_achieved_throughput(net); } else { if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, @@ -2212,7 +2212,7 @@ sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb, /* JRS - reset as if state were changed */ htcp_reset(&net->cc_mod.htcp_ca); - net->ssthresh = htcp_recalc_ssthresh(stcb, net); + net->ssthresh = htcp_recalc_ssthresh(net); net->cwnd = net->ssthresh; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), @@ -2266,7 +2266,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb, /* JRS - reset as if the state were being changed to timeout */ htcp_reset(&net->cc_mod.htcp_ca); - net->ssthresh = htcp_recalc_ssthresh(stcb, net); + net->ssthresh = htcp_recalc_ssthresh(net); net->cwnd = net->mtu; net->partial_bytes_acked = 0; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { @@ -2276,7 +2276,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb, static void sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb, - struct sctp_nets *net, int in_window, int num_pkt_lost) + struct sctp_nets *net, int in_window, int num_pkt_lost SCTP_UNUSED) { int old_cwnd; @@ -2286,7 +2286,7 @@ sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb, if (in_window == 0) { htcp_reset(&net->cc_mod.htcp_ca); SCTP_STAT_INCR(sctps_ecnereducedcwnd); - net->ssthresh = htcp_recalc_ssthresh(stcb, net); + net->ssthresh = htcp_recalc_ssthresh(net); if (net->ssthresh < net->mtu) { net->ssthresh = net->mtu; /* here back off the timer as well, to slow us down */ -- cgit v1.1