| 10771 | } |
| 10772 | |
| 10773 | static void |
| 10774 | bbr_enter_probe_rtt(struct tcp_bbr *bbr, uint32_t cts, int32_t line) |
| 10775 | { |
| 10776 | /* Change to probe_rtt */ |
| 10777 | uint32_t time_in; |
| 10778 | |
| 10779 | bbr->r_ctl.bbr_lost_at_state = bbr->r_ctl.rc_lost; |
| 10780 | bbr->r_ctl.flightsize_at_drain = ctf_flight_size(bbr->rc_tp, |
| 10781 | (bbr->r_ctl.rc_sacked + bbr->r_ctl.rc_lost_bytes)); |
| 10782 | bbr->r_ctl.r_app_limited_until = (bbr->r_ctl.flightsize_at_drain |
| 10783 | + bbr->r_ctl.rc_delivered); |
| 10784 | /* Setup so we force feed the filter */ |
| 10785 | if (bbr->rc_use_google || bbr_probertt_sets_rtt) |
| 10786 | bbr->rc_prtt_set_ts = 1; |
| 10787 | if (SEQ_GT(cts, bbr->r_ctl.rc_bbr_state_time)) { |
| 10788 | time_in = cts - bbr->r_ctl.rc_bbr_state_time; |
| 10789 | counter_u64_add(bbr_state_time[bbr->rc_bbr_state], time_in); |
| 10790 | } |
| 10791 | bbr_log_rtt_shrinks(bbr, cts, 0, 0, __LINE__, BBR_RTTS_ENTERPROBE, 0); |
| 10792 | bbr->r_ctl.rc_rtt_shrinks = cts; |
| 10793 | bbr->r_ctl.last_in_probertt = cts; |
| 10794 | bbr->r_ctl.rc_probertt_srttchktim = cts; |
| 10795 | bbr->r_ctl.rc_bbr_state_time = cts; |
| 10796 | bbr->rc_bbr_state = BBR_STATE_PROBE_RTT; |
| 10797 | /* We need to force the filter to update */ |
| 10798 | |
| 10799 | if ((bbr_sub_drain_slam_cwnd) && |
| 10800 | bbr->rc_hit_state_1 && |
| 10801 | (bbr->rc_use_google == 0) && |
| 10802 | (bbr_state_val(bbr) == BBR_SUB_DRAIN)) { |
| 10803 | if (bbr->rc_tp->snd_cwnd > bbr->r_ctl.rc_saved_cwnd) |
| 10804 | bbr->r_ctl.rc_saved_cwnd = bbr->rc_tp->snd_cwnd; |
| 10805 | } else |
| 10806 | bbr->r_ctl.rc_saved_cwnd = bbr->rc_tp->snd_cwnd; |
| 10807 | /* Update the lost */ |
| 10808 | bbr->r_ctl.rc_lost_at_startup = bbr->r_ctl.rc_lost; |
| 10809 | if ((bbr->r_ctl.bbr_rttprobe_gain_val == 0) || bbr->rc_use_google){ |
| 10810 | /* Set to the non-configurable default of 4 (PROBE_RTT_MIN) */ |
| 10811 | bbr->rc_tp->snd_cwnd = bbr_rtt_probe_cwndtarg * (bbr->rc_tp->t_maxseg - bbr->rc_last_options); |
| 10812 | bbr_log_type_cwndupd(bbr, 0, 0, 0, 12, 0, 0, __LINE__); |
| 10813 | bbr->r_ctl.rc_bbr_hptsi_gain = BBR_UNIT; |
| 10814 | bbr->r_ctl.rc_bbr_cwnd_gain = BBR_UNIT; |
| 10815 | bbr_log_set_of_state_target(bbr, bbr->rc_tp->snd_cwnd, __LINE__, 6); |
| 10816 | bbr->r_ctl.rc_target_at_state = bbr->rc_tp->snd_cwnd; |
| 10817 | } else { |
| 10818 | /* |
| 10819 | * We bring it down slowly by using a hptsi gain that is |
| 10820 | * probably 75%. This will slowly float down our outstanding |
| 10821 | * without tampering with the cwnd. |
| 10822 | */ |
| 10823 | bbr->r_ctl.rc_bbr_hptsi_gain = bbr->r_ctl.bbr_rttprobe_gain_val; |
| 10824 | bbr->r_ctl.rc_bbr_cwnd_gain = BBR_UNIT; |
| 10825 | bbr_set_state_target(bbr, __LINE__); |
| 10826 | if (bbr_prtt_slam_cwnd && |
| 10827 | (bbr->rc_tp->snd_cwnd > bbr->r_ctl.rc_target_at_state)) { |
| 10828 | bbr->rc_tp->snd_cwnd = bbr->r_ctl.rc_target_at_state; |
| 10829 | bbr_log_type_cwndupd(bbr, 0, 0, 0, 12, 0, 0, __LINE__); |
| 10830 | } |
no test coverage detected