Lines Matching refs:ccv
92 static void chd_ack_received(struct cc_var *ccv, ccsignal_t ack_type);
93 static void chd_cb_destroy(struct cc_var *ccv);
94 static int chd_cb_init(struct cc_var *ccv, void *ptr);
95 static void chd_cong_signal(struct cc_var *ccv, ccsignal_t signal_type);
96 static void chd_conn_init(struct cc_var *ccv);
147 chd_window_decrease(struct cc_var *ccv) in chd_window_decrease() argument
150 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in chd_window_decrease()
152 win = min(CCV(ccv, snd_wnd), CCV(ccv, snd_cwnd)) / mss; in chd_window_decrease()
154 CCV(ccv, snd_ssthresh) = max(win, 2) * mss; in chd_window_decrease()
190 chd_window_increase(struct cc_var *ccv, int new_measurement) in chd_window_increase() argument
194 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in chd_window_increase()
196 chd_data = ccv->cc_data; in chd_window_increase()
199 if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh)) { in chd_window_increase()
203 if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) { 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()
227 TCP_MAXWIN << CCV(ccv, snd_scale)); in chd_window_increase()
230 CCV(ccv,snd_cwnd) = min(CCV(ccv, snd_cwnd) + incr, in chd_window_increase()
231 TCP_MAXWIN << CCV(ccv, snd_scale)); in chd_window_increase()
240 chd_ack_received(struct cc_var *ccv, ccsignal_t ack_type) in chd_ack_received() argument
246 e_t = khelp_get_osd(&CCV(ccv, t_osd), ertt_id); in chd_ack_received()
247 chd_data = ccv->cc_data; in chd_ack_received()
261 if (rtt && e_t->minrtt && !IN_RECOVERY(CCV(ccv, t_flags))) { in chd_ack_received()
288 chd_data->shadow_w = max(CCV(ccv, snd_cwnd), in chd_ack_received()
303 chd_cong_signal(ccv, CC_CHD_DELAY); in chd_ack_received()
306 chd_window_increase(ccv, new_measurement); in chd_ack_received()
310 chd_cb_destroy(struct cc_var *ccv) in chd_cb_destroy() argument
312 free(ccv->cc_data, M_CC_MEM); in chd_cb_destroy()
322 chd_cb_init(struct cc_var *ccv, void *ptr) in chd_cb_init() argument
326 INP_WLOCK_ASSERT(tptoinpcb(ccv->tp)); in chd_cb_init()
335 ccv->cc_data = chd_data; in chd_cb_init()
341 chd_cong_signal(struct cc_var *ccv, ccsignal_t signal_type) in chd_cong_signal() argument
347 e_t = khelp_get_osd(&CCV(ccv, t_osd), ertt_id); in chd_cong_signal()
348 chd_data = ccv->cc_data; in chd_cong_signal()
353 chd_window_decrease(ccv); /* Set new ssthresh. */ in chd_cong_signal()
354 CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); in chd_cong_signal()
355 CCV(ccv, snd_recover) = CCV(ccv, snd_max); in chd_cong_signal()
356 ENTER_CONGRECOVERY(CCV(ccv, t_flags)); in chd_cong_signal()
368 if (!IN_RECOVERY(CCV(ccv, t_flags)) && qdly > V_chd_qthresh) { in chd_cong_signal()
370 CCV(ccv, snd_cwnd) = max(CCV(ccv, snd_cwnd), in chd_cong_signal()
373 chd_window_decrease(ccv); in chd_cong_signal()
379 CCV(ccv, snd_ssthresh) = CCV(ccv, snd_cwnd); in chd_cong_signal()
380 CCV(ccv, snd_recover) = CCV(ccv, snd_max); in chd_cong_signal()
384 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in chd_cong_signal()
388 ENTER_FASTRECOVERY(CCV(ccv, t_flags)); in chd_cong_signal()
392 newreno_cc_cong_signal(ccv, signal_type); in chd_cong_signal()
398 chd_conn_init(struct cc_var *ccv) in chd_conn_init() argument
402 chd_data = ccv->cc_data; in chd_conn_init()
410 chd_data->shadow_w = CCV(ccv, snd_cwnd); in chd_conn_init()