MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bbr_exit_persist

Function bbr_exit_persist

freebsd/netinet/tcp_stacks/bbr.c:8010–8068  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8008}
8009
8010static void
8011bbr_exit_persist(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts, int32_t line)
8012{
8013 uint32_t idle_time;
8014
8015 if (bbr->rc_in_persist == 0)
8016 return;
8017 idle_time = bbr_calc_time(cts, bbr->r_ctl.rc_went_idle_time);
8018 bbr->rc_in_persist = 0;
8019 bbr->rc_hit_state_1 = 0;
8020 bbr->r_ctl.rc_del_time = cts;
8021 /*
8022 * We invalidate the last ack here since we
8023 * don't want to transfer forward the time
8024 * for our sum's calculations.
8025 */
8026 if (bbr->rc_inp->inp_in_hpts) {
8027 tcp_hpts_remove(bbr->rc_inp, HPTS_REMOVE_OUTPUT);
8028 bbr->rc_timer_first = 0;
8029 bbr->r_ctl.rc_hpts_flags = 0;
8030 bbr->r_ctl.rc_last_delay_val = 0;
8031 bbr->r_ctl.rc_hptsi_agg_delay = 0;
8032 bbr->r_agg_early_set = 0;
8033 bbr->r_ctl.rc_agg_early = 0;
8034 }
8035 bbr_log_type_pesist(bbr, cts, idle_time, line, 0);
8036 if (idle_time >= bbr_rtt_probe_time) {
8037 /*
8038 * This qualifies as a RTT_PROBE session since we drop the
8039 * data outstanding to nothing and waited more than
8040 * bbr_rtt_probe_time.
8041 */
8042 bbr_log_rtt_shrinks(bbr, cts, 0, 0, __LINE__, BBR_RTTS_PERSIST, 0);
8043 bbr->r_ctl.last_in_probertt = bbr->r_ctl.rc_rtt_shrinks = cts;
8044 }
8045 tp->t_rxtshift = 0;
8046 /*
8047 * If in probeBW and we have persisted more than an RTT lets do
8048 * special handling.
8049 */
8050 /* Force a time based epoch */
8051 bbr_set_epoch(bbr, cts, __LINE__);
8052 /*
8053 * Setup the lost so we don't count anything against the guy
8054 * we have been stuck with during persists.
8055 */
8056 bbr->r_ctl.bbr_lost_at_state = bbr->r_ctl.rc_lost;
8057 /* Time un-freezes for the state */
8058 bbr->r_ctl.rc_bbr_state_time = cts;
8059 if ((bbr->rc_bbr_state == BBR_STATE_PROBE_BW) ||
8060 (bbr->rc_bbr_state == BBR_STATE_PROBE_RTT)) {
8061 /*
8062 * If we are going back to probe-bw
8063 * or probe_rtt, we may need to possibly
8064 * do a fast restart.
8065 */
8066 bbr_restart_after_idle(bbr, cts, idle_time);
8067 }

Callers 3

bbr_timeout_persistFunction · 0.85
bbr_process_dataFunction · 0.85
bbr_fastackFunction · 0.85

Calls 5

bbr_calc_timeFunction · 0.85
bbr_log_type_pesistFunction · 0.85
bbr_log_rtt_shrinksFunction · 0.85
bbr_set_epochFunction · 0.85
bbr_restart_after_idleFunction · 0.85

Tested by

no test coverage detected