diff options
| author | Randall Stewart <rrs@FreeBSD.org> | 2008-08-27 12:30:09 +0000 |
|---|---|---|
| committer | Randall Stewart <rrs@FreeBSD.org> | 2008-08-27 12:30:09 +0000 |
| commit | f53f7e86d1c2367675dae966cf131af80fd86d89 (patch) | |
| tree | 2ef9bb1de99d9347d1563968094be53a927c3e2d /sys/netinet/sctp_cc_functions.c | |
| parent | ea160e0238c0b0b4ebc6f7cc2b6617b6879ba6fc (diff) | |
Notes
Diffstat (limited to 'sys/netinet/sctp_cc_functions.c')
| -rw-r--r-- | sys/netinet/sctp_cc_functions.c | 123 |
1 files changed, 63 insertions, 60 deletions
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index a4ada89c5e88..02fb1a9a9073 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -55,7 +55,7 @@ sctp_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; - if (sctp_logging_level & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION); } } @@ -71,7 +71,7 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb, * (net->fast_retran_loss_recovery == 0))) */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if ((asoc->fast_retran_loss_recovery == 0) || (sctp_cmt_on_off == 1)) { + if ((asoc->fast_retran_loss_recovery == 0) || (SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 1)) { /* out of a RFC2582 Fast recovery window? */ if (net->net_ack > 0) { /* @@ -88,7 +88,7 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb, net->ssthresh = 2 * net->mtu; } net->cwnd = net->ssthresh; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_FR); } @@ -165,7 +165,7 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, } } #endif - if (sctp_early_fr) { + if (SCTP_BASE_SYSCTL(sctp_early_fr)) { /* * So, first of all do we need to have a Early FR * timer running? @@ -201,7 +201,7 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, } /* if nothing was acked on this destination skip it */ if (net->net_ack == 0) { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_LOG_FROM_SACK); } continue; @@ -232,10 +232,11 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, * * Should we stop any running T3 timer here? */ - if (sctp_cmt_on_off && sctp_cmt_pf && ((net->dest_state & SCTP_ADDR_PF) == - SCTP_ADDR_PF)) { + if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && + SCTP_BASE_SYSCTL(sctp_cmt_pf) && + ((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF)) { net->dest_state &= ~SCTP_ADDR_PF; - net->cwnd = net->mtu * sctp_cmt_pf; + net->cwnd = net->mtu * SCTP_BASE_SYSCTL(sctp_cmt_pf); SCTPDBG(SCTP_DEBUG_INDATA1, "Destination %p moved from PF to reachable with cwnd %d.\n", net, net->cwnd); /* @@ -259,7 +260,7 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, */ #endif - if (asoc->fast_retran_loss_recovery && will_exit == 0 && sctp_cmt_on_off == 0) { + if (asoc->fast_retran_loss_recovery && will_exit == 0 && SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 0) { /* * If we are in loss recovery we skip any cwnd * update @@ -270,26 +271,26 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, * CMT: CUC algorithm. Update cwnd if pseudo-cumack has * moved. */ - if (accum_moved || (sctp_cmt_on_off && net->new_pseudo_cumack)) { + if (accum_moved || (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && net->new_pseudo_cumack)) { /* If the cumulative ack moved we can proceed */ if (net->cwnd <= net->ssthresh) { /* We are in slow start */ if (net->flight_size + net->net_ack >= net->cwnd) { - if (net->net_ack > (net->mtu * sctp_L2_abc_variable)) { - net->cwnd += (net->mtu * sctp_L2_abc_variable); - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (net->net_ack > (net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable))) { + net->cwnd += (net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable)); + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_SS); } } else { net->cwnd += net->net_ack; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_FROM_SS); } } } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_SS); } @@ -305,19 +306,19 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, (net->partial_bytes_acked >= net->cwnd)) { net->partial_bytes_acked -= net->cwnd; net->cwnd += net->mtu; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_CA); } } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_CA); } } } } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_NO_CUMACK); } @@ -351,7 +352,7 @@ sctp_cwnd_update_after_timeout(struct sctp_tcb *stcb, struct sctp_nets *net) net->cwnd = net->mtu; net->partial_bytes_acked = 0; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->cwnd - old_cwnd, SCTP_CWND_LOG_FROM_RTX); } } @@ -369,7 +370,7 @@ sctp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb, struct sctp_nets *net) net->RTO <<= 1; } net->cwnd = net->ssthresh; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); } } @@ -478,7 +479,7 @@ sctp_cwnd_update_after_packet_dropped(struct sctp_tcb *stcb, } if (net->cwnd - old_cwnd != 0) { /* log only changes */ - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); } @@ -495,7 +496,7 @@ sctp_cwnd_update_after_output(struct sctp_tcb *stcb, net->ssthresh = net->cwnd; net->cwnd = (net->flight_size + (burst_limit * net->mtu)); - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_BRST); } } @@ -516,7 +517,7 @@ sctp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp, if (net->cwnd < net->ssthresh) /* still in SS move to CA */ net->ssthresh = net->cwnd - 1; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (old_cwnd - net->cwnd), SCTP_CWND_LOG_FROM_FR); } } @@ -619,12 +620,12 @@ sctp_hs_cwnd_increase(struct sctp_tcb *stcb, struct sctp_nets *net) /* normal mode */ if (net->net_ack > net->mtu) { net->cwnd += net->mtu; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_SS); } } else { net->cwnd += net->net_ack; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_FROM_SS); } } @@ -638,7 +639,7 @@ sctp_hs_cwnd_increase(struct sctp_tcb *stcb, struct sctp_nets *net) net->last_hs_used = indx; incr = ((sctp_cwnd_adjust[indx].increase) << 10); net->cwnd += incr; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, incr, SCTP_CWND_LOG_FROM_SS); } } @@ -680,7 +681,7 @@ sctp_hs_cwnd_decrease(struct sctp_tcb *stcb, struct sctp_nets *net) net->last_hs_used = indx; } } - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_FR); } } @@ -696,7 +697,7 @@ sctp_hs_cwnd_update_after_fr(struct sctp_tcb *stcb, * (net->fast_retran_loss_recovery == 0))) */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if ((asoc->fast_retran_loss_recovery == 0) || (sctp_cmt_on_off == 1)) { + if ((asoc->fast_retran_loss_recovery == 0) || (SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 1)) { /* out of a RFC2582 Fast recovery window? */ if (net->net_ack > 0) { /* @@ -782,7 +783,7 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, } } #endif - if (sctp_early_fr) { + if (SCTP_BASE_SYSCTL(sctp_early_fr)) { /* * So, first of all do we need to have a Early FR * timer running? @@ -818,7 +819,7 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, } /* if nothing was acked on this destination skip it */ if (net->net_ack == 0) { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_LOG_FROM_SACK); } continue; @@ -849,10 +850,11 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, * * Should we stop any running T3 timer here? */ - if (sctp_cmt_on_off && sctp_cmt_pf && ((net->dest_state & SCTP_ADDR_PF) == - SCTP_ADDR_PF)) { + if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && + SCTP_BASE_SYSCTL(sctp_cmt_pf) && + ((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF)) { net->dest_state &= ~SCTP_ADDR_PF; - net->cwnd = net->mtu * sctp_cmt_pf; + net->cwnd = net->mtu * SCTP_BASE_SYSCTL(sctp_cmt_pf); SCTPDBG(SCTP_DEBUG_INDATA1, "Destination %p moved from PF to reachable with cwnd %d.\n", net, net->cwnd); /* @@ -876,7 +878,7 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, */ #endif - if (asoc->fast_retran_loss_recovery && will_exit == 0 && sctp_cmt_on_off == 0) { + if (asoc->fast_retran_loss_recovery && will_exit == 0 && SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 0) { /* * If we are in loss recovery we skip any cwnd * update @@ -887,7 +889,7 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, * CMT: CUC algorithm. Update cwnd if pseudo-cumack has * moved. */ - if (accum_moved || (sctp_cmt_on_off && net->new_pseudo_cumack)) { + if (accum_moved || (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && net->new_pseudo_cumack)) { /* If the cumulative ack moved we can proceed */ if (net->cwnd <= net->ssthresh) { /* We are in slow start */ @@ -896,7 +898,7 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, sctp_hs_cwnd_increase(stcb, net); } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_SS); } @@ -908,19 +910,19 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb, (net->partial_bytes_acked >= net->cwnd)) { net->partial_bytes_acked -= net->cwnd; net->cwnd += net->mtu; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_CA); } } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_CA); } } } } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_NO_CUMACK); } @@ -1151,21 +1153,21 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net) if (net->cwnd <= net->ssthresh) { /* We are in slow start */ if (net->flight_size + net->net_ack >= net->cwnd) { - if (net->net_ack > (net->mtu * sctp_L2_abc_variable)) { - net->cwnd += (net->mtu * sctp_L2_abc_variable); - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (net->net_ack > (net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable))) { + net->cwnd += (net->mtu * SCTP_BASE_SYSCTL(sctp_L2_abc_variable)); + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_SS); } } else { net->cwnd += net->net_ack; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_FROM_SS); } } } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_SS); } @@ -1186,13 +1188,13 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net) net->cwnd += net->mtu; net->partial_bytes_acked = 0; htcp_alpha_update(&net->htcp_ca); - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_FROM_CA); } } else { net->partial_bytes_acked += net->net_ack; - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_CA); } @@ -1233,7 +1235,7 @@ sctp_htcp_set_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) net->ssthresh = stcb->asoc.peers_rwnd; htcp_init(stcb, net); - if (sctp_logging_level & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_INITIALIZATION); } } @@ -1264,7 +1266,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, } } #endif - if (sctp_early_fr) { + if (SCTP_BASE_SYSCTL(sctp_early_fr)) { /* * So, first of all do we need to have a Early FR * timer running? @@ -1300,7 +1302,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, } /* if nothing was acked on this destination skip it */ if (net->net_ack == 0) { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, 0, SCTP_CWND_LOG_FROM_SACK); } continue; @@ -1331,10 +1333,11 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, * * Should we stop any running T3 timer here? */ - if (sctp_cmt_on_off && sctp_cmt_pf && ((net->dest_state & SCTP_ADDR_PF) == - SCTP_ADDR_PF)) { + if (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && + SCTP_BASE_SYSCTL(sctp_cmt_pf) && + ((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF)) { net->dest_state &= ~SCTP_ADDR_PF; - net->cwnd = net->mtu * sctp_cmt_pf; + net->cwnd = net->mtu * SCTP_BASE_SYSCTL(sctp_cmt_pf); SCTPDBG(SCTP_DEBUG_INDATA1, "Destination %p moved from PF to reachable with cwnd %d.\n", net, net->cwnd); /* @@ -1358,7 +1361,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, */ #endif - if (asoc->fast_retran_loss_recovery && will_exit == 0 && sctp_cmt_on_off == 0) { + if (asoc->fast_retran_loss_recovery && will_exit == 0 && SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 0) { /* * If we are in loss recovery we skip any cwnd * update @@ -1369,11 +1372,11 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb, * CMT: CUC algorithm. Update cwnd if pseudo-cumack has * moved. */ - if (accum_moved || (sctp_cmt_on_off && net->new_pseudo_cumack)) { + if (accum_moved || (SCTP_BASE_SYSCTL(sctp_cmt_on_off) && net->new_pseudo_cumack)) { htcp_cong_avoid(stcb, net); measure_achieved_throughput(stcb, net); } else { - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->mtu, SCTP_CWND_LOG_NO_CUMACK); } @@ -1409,7 +1412,7 @@ sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb, * (net->fast_retran_loss_recovery == 0))) */ TAILQ_FOREACH(net, &asoc->nets, sctp_next) { - if ((asoc->fast_retran_loss_recovery == 0) || (sctp_cmt_on_off == 1)) { + if ((asoc->fast_retran_loss_recovery == 0) || (SCTP_BASE_SYSCTL(sctp_cmt_on_off) == 1)) { /* out of a RFC2582 Fast recovery window? */ if (net->net_ack > 0) { /* @@ -1425,7 +1428,7 @@ sctp_htcp_cwnd_update_after_fr(struct sctp_tcb *stcb, htcp_reset(&net->htcp_ca); net->ssthresh = htcp_recalc_ssthresh(stcb, net); net->cwnd = net->ssthresh; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_FR); } @@ -1487,7 +1490,7 @@ sctp_htcp_cwnd_update_after_timeout(struct sctp_tcb *stcb, net->ssthresh = htcp_recalc_ssthresh(stcb, net); net->cwnd = net->mtu; net->partial_bytes_acked = 0; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, net->cwnd - old_cwnd, SCTP_CWND_LOG_FROM_RTX); } } @@ -1511,7 +1514,7 @@ sctp_htcp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp, if (net->cwnd < net->ssthresh) /* still in SS move to CA */ net->ssthresh = net->cwnd - 1; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (old_cwnd - net->cwnd), SCTP_CWND_LOG_FROM_FR); } } @@ -1534,7 +1537,7 @@ sctp_htcp_cwnd_update_after_ecn_echo(struct sctp_tcb *stcb, net->RTO <<= 1; } net->cwnd = net->ssthresh; - if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) { sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT); } } |
