Lines Matching refs:ccv
392 newreno_cc_post_recovery(struct cc_var *ccv) in newreno_cc_post_recovery() argument
395 uint32_t mss = tcp_fixed_maxseg(ccv->tp); in newreno_cc_post_recovery()
397 if (IN_FASTRECOVERY(CCV(ccv, t_flags))) { in newreno_cc_post_recovery()
408 pipe = tcp_compute_pipe(ccv->tp); in newreno_cc_post_recovery()
410 pipe = CCV(ccv, snd_max) - ccv->curack; in newreno_cc_post_recovery()
411 if (pipe < CCV(ccv, snd_ssthresh)) in newreno_cc_post_recovery()
416 CCV(ccv, snd_cwnd) = max(pipe, mss) + mss; in newreno_cc_post_recovery()
418 CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); in newreno_cc_post_recovery()
423 newreno_cc_after_idle(struct cc_var *ccv) in newreno_cc_after_idle() argument
443 rw = tcp_compute_initwnd(tcp_fixed_maxseg(ccv->tp)); in newreno_cc_after_idle()
445 CCV(ccv, snd_ssthresh) = max(CCV(ccv, snd_ssthresh), in newreno_cc_after_idle()
446 CCV(ccv, snd_cwnd)-(CCV(ccv, snd_cwnd)>>2)); in newreno_cc_after_idle()
448 CCV(ccv, snd_cwnd) = min(rw, CCV(ccv, snd_cwnd)); in newreno_cc_after_idle()
455 newreno_cc_cwnd_on_multiplicative_decrease(struct cc_var *ccv, uint32_t mss) in newreno_cc_cwnd_on_multiplicative_decrease() argument
459 cwin = CCV(ccv, snd_cwnd); in newreno_cc_cwnd_on_multiplicative_decrease()
474 newreno_cc_cong_signal(struct cc_var *ccv, ccsignal_t type) in newreno_cc_cong_signal() argument
478 mss = tcp_fixed_maxseg(ccv->tp); in newreno_cc_cong_signal()
484 cwin = newreno_cc_cwnd_on_multiplicative_decrease(ccv, mss); in newreno_cc_cong_signal()
488 if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { in newreno_cc_cong_signal()
489 if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) in newreno_cc_cong_signal()
490 CCV(ccv, snd_ssthresh) = cwin; in newreno_cc_cong_signal()
491 ENTER_RECOVERY(CCV(ccv, t_flags)); in newreno_cc_cong_signal()
495 if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { in newreno_cc_cong_signal()
496 CCV(ccv, snd_ssthresh) = cwin; in newreno_cc_cong_signal()
497 CCV(ccv, snd_cwnd) = cwin; in newreno_cc_cong_signal()
498 ENTER_CONGRECOVERY(CCV(ccv, t_flags)); in newreno_cc_cong_signal()
502 if (CCV(ccv, t_rxtshift) == 1) { in newreno_cc_cong_signal()
504 pipe = tcp_compute_pipe(ccv->tp); in newreno_cc_cong_signal()
506 pipe = CCV(ccv, snd_max) - in newreno_cc_cong_signal()
507 CCV(ccv, snd_fack) + in newreno_cc_cong_signal()
508 CCV(ccv, sackhint.sack_bytes_rexmit); in newreno_cc_cong_signal()
510 CCV(ccv, snd_ssthresh) = max(2, in newreno_cc_cong_signal()
511 min(CCV(ccv, snd_wnd), pipe) / 2 / mss) * mss; in newreno_cc_cong_signal()
513 CCV(ccv, snd_cwnd) = mss; in newreno_cc_cong_signal()
521 newreno_cc_cwnd_in_cong_avoid(struct cc_var *ccv) in newreno_cc_cwnd_in_cong_avoid() argument
523 u_int cw = CCV(ccv, snd_cwnd); in newreno_cc_cwnd_in_cong_avoid()
524 u_int incr = tcp_fixed_maxseg(ccv->tp); in newreno_cc_cwnd_in_cong_avoid()
526 KASSERT(cw > CCV(ccv, snd_ssthresh), in newreno_cc_cwnd_in_cong_avoid()
547 if (ccv->flags & CCF_ABC_SENTAWND) in newreno_cc_cwnd_in_cong_avoid()
548 ccv->flags &= ~CCF_ABC_SENTAWND; in newreno_cc_cwnd_in_cong_avoid()
555 return min(cw + incr, TCP_MAXWIN << CCV(ccv, snd_scale)); in newreno_cc_cwnd_in_cong_avoid()
561 newreno_cc_cwnd_in_slow_start(struct cc_var *ccv) in newreno_cc_cwnd_in_slow_start() argument
563 u_int cw = CCV(ccv, snd_cwnd); in newreno_cc_cwnd_in_slow_start()
564 u_int mss = tcp_fixed_maxseg(ccv->tp); in newreno_cc_cwnd_in_slow_start()
567 KASSERT(cw <= CCV(ccv, snd_ssthresh), in newreno_cc_cwnd_in_slow_start()
597 if (ccv->flags & CCF_USE_LOCAL_ABC) in newreno_cc_cwnd_in_slow_start()
598 abc_val = ccv->labc; in newreno_cc_cwnd_in_slow_start()
601 if (CCV(ccv, snd_nxt) == CCV(ccv, snd_max)) in newreno_cc_cwnd_in_slow_start()
602 incr = min(ccv->bytes_this_ack, in newreno_cc_cwnd_in_slow_start()
603 ccv->nsegs * abc_val * mss); in newreno_cc_cwnd_in_slow_start()
605 incr = min(ccv->bytes_this_ack, mss); in newreno_cc_cwnd_in_slow_start()
609 return min(cw + incr, TCP_MAXWIN << CCV(ccv, snd_scale)); in newreno_cc_cwnd_in_slow_start()
615 newreno_cc_ack_received(struct cc_var *ccv, ccsignal_t type) in newreno_cc_ack_received() argument
617 if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && in newreno_cc_ack_received()
618 (ccv->flags & CCF_CWND_LIMITED)) { in newreno_cc_ack_received()
619 if (CCV(ccv, snd_cwnd) > CCV(ccv, snd_ssthresh)) { in newreno_cc_ack_received()
620 CCV(ccv, snd_cwnd) = newreno_cc_cwnd_in_cong_avoid(ccv); in newreno_cc_ack_received()
622 CCV(ccv, snd_cwnd) = newreno_cc_cwnd_in_slow_start(ccv); in newreno_cc_ack_received()