Lines Matching defs:ccv

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