| 10707 | } |
| 10708 | |
| 10709 | static uint32_t |
| 10710 | bbr_get_a_state_target(struct tcp_bbr *bbr, uint32_t gain) |
| 10711 | { |
| 10712 | uint32_t mss, tar; |
| 10713 | |
| 10714 | if (bbr->rc_use_google) { |
| 10715 | /* Google just uses the cwnd target */ |
| 10716 | tar = bbr_get_target_cwnd(bbr, bbr_get_bw(bbr), gain); |
| 10717 | } else { |
| 10718 | mss = min((bbr->rc_tp->t_maxseg - bbr->rc_last_options), |
| 10719 | bbr->r_ctl.rc_pace_max_segs); |
| 10720 | /* Get the base cwnd with gain rounded to a mss */ |
| 10721 | tar = roundup(bbr_get_raw_target_cwnd(bbr, bbr_get_bw(bbr), |
| 10722 | gain), mss); |
| 10723 | /* Make sure it is within our min */ |
| 10724 | if (tar < get_min_cwnd(bbr)) |
| 10725 | return (get_min_cwnd(bbr)); |
| 10726 | } |
| 10727 | return (tar); |
| 10728 | } |
| 10729 | |
| 10730 | static void |
| 10731 | bbr_set_state_target(struct tcp_bbr *bbr, int line) |
no test coverage detected