From a490cf2e7ef9d2e524f85d9cde3d5c8318409542 Mon Sep 17 00:00:00 2001 From: rrs Date: Tue, 20 May 2008 09:51:36 +0000 Subject: - Define changes in sctp.h - Bug in CA that does not get us incrementing the PBA properly which made us more conservative. - comment updated in sctp_input.c - memsets added before we log - added arg to hmac id's MFC after: 2 weeks --- sys/netinet/sctp_cc_functions.c | 51 +++++++++++------------------------------ 1 file changed, 13 insertions(+), 38 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 90a809c..3e22a54 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -304,50 +304,25 @@ sctp_cwnd_update_after_sack(struct sctp_tcb *stcb, } } else { /* We are in congestion avoidance */ - if (net->flight_size + net->net_ack >= - net->cwnd) { - /* - * add to pba only if we had a - * cwnd's worth (or so) in flight OR - * the burst limit was applied. - */ - net->partial_bytes_acked += - net->net_ack; - - /* - * Do we need to increase (if pba is - * > cwnd)? - */ - if (net->partial_bytes_acked >= - net->cwnd) { - if (net->cwnd < - net->partial_bytes_acked) { - net->partial_bytes_acked -= - net->cwnd; - } else { - net->partial_bytes_acked = - 0; - } - net->cwnd += net->mtu; - if (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) { - sctp_log_cwnd(stcb, net, net->net_ack, - SCTP_CWND_LOG_NOADV_CA); - } + /* + * Add to pba + */ + net->partial_bytes_acked += + net->net_ack; + + if ((net->flight_size + net->net_ack >= net->cwnd) && + (net->partial_bytes_acked >= net->cwnd)) { + net->partial_bytes_acked -= net->cwnd; + net->cwnd += net->mtu; + if (sctp_logging_level & SCTP_CWND_MONITOR_ENABLE) { + sctp_log_cwnd(stcb, net, net->mtu, + SCTP_CWND_LOG_FROM_CA); } } else { - unsigned int dif; - if (sctp_logging_level & SCTP_CWND_LOGGING_ENABLE) { sctp_log_cwnd(stcb, net, net->net_ack, SCTP_CWND_LOG_NOADV_CA); } - dif = net->cwnd - (net->flight_size + - net->net_ack); } } } else { -- cgit v1.1