summaryrefslogtreecommitdiff
path: root/sys/netinet/sctp_cc_functions.c
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2007-07-17 20:58:26 +0000
committerRandall Stewart <rrs@FreeBSD.org>2007-07-17 20:58:26 +0000
commit18e198d3a3c55602a662375fdad5e83bef8bed93 (patch)
tree6c79e4122192f2fc2cd2730d66ed9af4e467112a /sys/netinet/sctp_cc_functions.c
parent928e6222fde7f19a9290c5e316e52bfb1464d40f (diff)
downloadsrc-test2-18e198d3a3c55602a662375fdad5e83bef8bed93.tar.gz
src-test2-18e198d3a3c55602a662375fdad5e83bef8bed93.zip
Notes
Diffstat (limited to 'sys/netinet/sctp_cc_functions.c')
-rw-r--r--sys/netinet/sctp_cc_functions.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c
index 3bc3b104afc9..b934fd926f82 100644
--- a/sys/netinet/sctp_cc_functions.c
+++ b/sys/netinet/sctp_cc_functions.c
@@ -235,7 +235,7 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb,
*
* Should we stop any running T3 timer here?
*/
- if (sctp_cmt_pf && ((net->dest_state & SCTP_ADDR_PF) ==
+ if (sctp_cmt_on_off && 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;
@@ -724,7 +724,7 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
*
* Should we stop any running T3 timer here?
*/
- if (sctp_cmt_pf && ((net->dest_state & SCTP_ADDR_PF) ==
+ if (sctp_cmt_on_off && 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;
@@ -1047,7 +1047,7 @@ between(uint32_t seq1, uint32_t seq2, uint32_t seq3)
static inline uint32_t
htcp_cong_time(struct htcp *ca)
{
- return ticks - ca->last_cong;
+ return sctp_get_tick_count() - ca->last_cong;
}
static inline uint32_t
@@ -1062,7 +1062,7 @@ htcp_reset(struct htcp *ca)
ca->undo_last_cong = ca->last_cong;
ca->undo_maxRTT = ca->maxRTT;
ca->undo_old_maxB = ca->old_maxB;
- ca->last_cong = ticks;
+ ca->last_cong = sctp_get_tick_count();
}
#ifdef SCTP_NOT_USED
@@ -1099,7 +1099,7 @@ measure_rtt(struct sctp_tcb *stcb, struct sctp_nets *net)
static void
measure_achieved_throughput(struct sctp_tcb *stcb, struct sctp_nets *net)
{
- uint32_t now = ticks;
+ uint32_t now = sctp_get_tick_count();
if (net->fast_retran_ip == 0)
net->htcp_ca.bytes_acked = net->net_ack;
@@ -1303,7 +1303,7 @@ htcp_init(struct sctp_tcb *stcb, struct sctp_nets *net)
net->htcp_ca.alpha = ALPHA_BASE;
net->htcp_ca.beta = BETA_MIN;
net->htcp_ca.bytes_acked = net->mtu;
- net->htcp_ca.last_cong = ticks;
+ net->htcp_ca.last_cong = sctp_get_tick_count();
}
void
@@ -1419,7 +1419,7 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
*
* Should we stop any running T3 timer here?
*/
- if (sctp_cmt_pf && ((net->dest_state & SCTP_ADDR_PF) ==
+ if (sctp_cmt_on_off && 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;
@@ -1592,7 +1592,7 @@ sctp_htcp_cwnd_update_after_fr_timer(struct sctp_inpcb *inp,
old_cwnd = net->cwnd;
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_EARLY_FR_TMR);
- net->htcp_ca.last_cong = ticks;
+ net->htcp_ca.last_cong = sctp_get_tick_count();
/*
* make a small adjustment to cwnd and force to CA.
*/