| 10728 | } |
| 10729 | |
| 10730 | static void |
| 10731 | bbr_set_state_target(struct tcp_bbr *bbr, int line) |
| 10732 | { |
| 10733 | uint32_t tar, meth; |
| 10734 | |
| 10735 | if ((bbr->rc_bbr_state == BBR_STATE_PROBE_RTT) && |
| 10736 | ((bbr->r_ctl.bbr_rttprobe_gain_val == 0) || bbr->rc_use_google)) { |
| 10737 | /* Special case using old probe-rtt method */ |
| 10738 | tar = bbr_rtt_probe_cwndtarg * (bbr->rc_tp->t_maxseg - bbr->rc_last_options); |
| 10739 | meth = 1; |
| 10740 | } else { |
| 10741 | /* Non-probe-rtt case and reduced probe-rtt */ |
| 10742 | if ((bbr->rc_bbr_state == BBR_STATE_PROBE_BW) && |
| 10743 | (bbr->r_ctl.rc_bbr_hptsi_gain > BBR_UNIT)) { |
| 10744 | /* For gain cycle we use the hptsi gain */ |
| 10745 | tar = bbr_get_a_state_target(bbr, bbr->r_ctl.rc_bbr_hptsi_gain); |
| 10746 | meth = 2; |
| 10747 | } else if ((bbr_target_is_bbunit) || bbr->rc_use_google) { |
| 10748 | /* |
| 10749 | * If configured, or for google all other states |
| 10750 | * get BBR_UNIT. |
| 10751 | */ |
| 10752 | tar = bbr_get_a_state_target(bbr, BBR_UNIT); |
| 10753 | meth = 3; |
| 10754 | } else { |
| 10755 | /* |
| 10756 | * Or we set a target based on the pacing gain |
| 10757 | * for non-google mode and default (non-configured). |
| 10758 | * Note we don't set a target goal below drain (192). |
| 10759 | */ |
| 10760 | if (bbr->r_ctl.rc_bbr_hptsi_gain < bbr_hptsi_gain[BBR_SUB_DRAIN]) { |
| 10761 | tar = bbr_get_a_state_target(bbr, bbr_hptsi_gain[BBR_SUB_DRAIN]); |
| 10762 | meth = 4; |
| 10763 | } else { |
| 10764 | tar = bbr_get_a_state_target(bbr, bbr->r_ctl.rc_bbr_hptsi_gain); |
| 10765 | meth = 5; |
| 10766 | } |
| 10767 | } |
| 10768 | } |
| 10769 | bbr_log_set_of_state_target(bbr, tar, line, meth); |
| 10770 | bbr->r_ctl.rc_target_at_state = tar; |
| 10771 | } |
| 10772 | |
| 10773 | static void |
| 10774 | bbr_enter_probe_rtt(struct tcp_bbr *bbr, uint32_t cts, int32_t line) |
no test coverage detected