Lines Matching +full:software +full:- +full:based

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2009-2010
6 * Copyright (c) 2010-2011 The FreeBSD Foundation
9 * This software was developed at the Centre for Advanced Internet
14 * Portions of this software were developed at the Centre for Advanced Internet
27 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 * An implementation of the CAIA-Hamilton delay based congestion control
42 * algorithm, based on "Improved coexistence and loss tolerance for delay based
45 * 11-14 October 2010.
84 * Private signal type for rate based congestion signal.
85 * See <netinet/cc.h> for appropriate bit-range to use for private signals.
102 * Shadow window - keeps track of what the NewReno congestion window
103 * would have been if delay-based cwnd backoffs had not been made. This
104 * functionality aids coexistence with loss-based TCP flows which may be
109 * Loss-based TCP compatibility flag - When set, it turns on the shadow
150 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in chd_window_decrease()
153 win -= max((win / 2), 1); in chd_window_decrease()
169 chd_data->loss_compete = 0; in should_backoff()
171 (V_chd_qthresh - V_chd_qmin)) * in should_backoff()
172 (qdly - V_chd_qmin); in should_backoff()
176 (maxqdly - V_chd_qthresh)) * in should_backoff()
177 (maxqdly - qdly); in should_backoff()
179 chd_data->loss_compete = 1; in should_backoff()
182 chd_data->loss_compete = 0; in should_backoff()
194 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in chd_window_increase()
196 chd_data = ccv->cc_data; in chd_window_increase()
202 /* In slow-start with ABC enabled. */ in chd_window_increase()
205 incr = min(ccv->bytes_this_ack, in chd_window_increase()
209 incr = min(ccv->bytes_this_ack, mss); in chd_window_increase()
216 if (ccv->flags & CCF_ABC_SENTAWND) { in chd_window_increase()
217 ccv->flags &= ~CCF_ABC_SENTAWND; in chd_window_increase()
224 if (chd_data->shadow_w > 0) { in chd_window_increase()
226 chd_data->shadow_w = min(chd_data->shadow_w + incr, in chd_window_increase()
235 * All ACK signals are used for timing measurements to determine delay-based
247 chd_data = ccv->cc_data; in chd_ack_received()
248 new_measurement = e_t->flags & ERTT_NEW_MEASUREMENT; in chd_ack_received()
251 chd_data->maxrtt_in_rtt = imax(e_t->rtt, chd_data->maxrtt_in_rtt); in chd_ack_received()
256 * is delay based congestion. in chd_ack_received()
258 rtt = V_chd_use_max ? chd_data->maxrtt_in_rtt : e_t->rtt; in chd_ack_received()
259 chd_data->maxrtt_in_rtt = 0; in chd_ack_received()
261 if (rtt && e_t->minrtt && !IN_RECOVERY(CCV(ccv, t_flags))) { in chd_ack_received()
262 qdly = rtt - e_t->minrtt; in chd_ack_received()
265 * Probabilistic delay based congestion in chd_ack_received()
269 e_t->maxrtt - e_t->minrtt, chd_data); in chd_ack_received()
271 chd_data->loss_compete = 0; in chd_ack_received()
274 e_t->flags &= ~ERTT_NEW_MEASUREMENT; in chd_ack_received()
279 * Update shadow_w before delay based backoff. in chd_ack_received()
281 if (chd_data->loss_compete || in chd_ack_received()
282 qdly > chd_data->prev_backoff_qdly) { in chd_ack_received()
286 * loss based flows. in chd_ack_received()
288 chd_data->shadow_w = max(CCV(ccv, snd_cwnd), in chd_ack_received()
289 chd_data->shadow_w); in chd_ack_received()
293 * not competing with loss based flows at the moment. in chd_ack_received()
295 chd_data->shadow_w = 0; in chd_ack_received()
298 chd_data->prev_backoff_qdly = qdly; in chd_ack_received()
300 * Send delay-based congestion signal to the congestion signal in chd_ack_received()
312 free(ccv->cc_data, M_CC_MEM); in chd_cb_destroy()
326 INP_WLOCK_ASSERT(tptoinpcb(ccv->tp)); in chd_cb_init()
334 chd_data->shadow_w = 0; in chd_cb_init()
335 ccv->cc_data = chd_data; in chd_cb_init()
348 chd_data = ccv->cc_data; in chd_cong_signal()
349 qdly = imax(e_t->rtt, chd_data->maxrtt_in_rtt) - e_t->minrtt; in chd_cong_signal()
364 * than qthresh, assume that we are competing with loss based in chd_cong_signal()
369 if (chd_data->loss_compete) { in chd_cong_signal()
371 chd_data->shadow_w); in chd_cong_signal()
383 if (chd_data->shadow_w > 0) { in chd_cong_signal()
384 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in chd_cong_signal()
385 chd_data->shadow_w = max(chd_data->shadow_w / in chd_cong_signal()
402 chd_data = ccv->cc_data; in chd_conn_init()
403 chd_data->prev_backoff_qdly = 0; in chd_conn_init()
404 chd_data->maxrtt_in_rtt = 0; in chd_conn_init()
405 chd_data->loss_compete = 0; in chd_conn_init()
408 * competing with loss based flows from the start. in chd_conn_init()
410 chd_data->shadow_w = CCV(ccv, snd_cwnd); in chd_conn_init()
433 if (error == 0 && req->newptr != NULL) { in chd_loss_fair_handler()
451 if (error == 0 && req->newptr != NULL) { in chd_pmax_handler()
469 if (error == 0 && req->newptr != NULL) { in chd_qthresh_handler()
481 "CAIA Hamilton delay-based congestion control related settings");