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

Function bbr_timer_cancel

freebsd/netinet/tcp_stacks/bbr.c:5255–5292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5253}
5254
5255static void
5256bbr_timer_cancel(struct tcp_bbr *bbr, int32_t line, uint32_t cts)
5257{
5258 if (bbr->r_ctl.rc_hpts_flags & PACE_TMR_MASK) {
5259 uint8_t hpts_removed = 0;
5260
5261 if (bbr->rc_inp->inp_in_hpts &&
5262 (bbr->rc_timer_first == 1)) {
5263 /*
5264 * If we are canceling timer's when we have the
5265 * timer ahead of the output being paced. We also
5266 * must remove ourselves from the hpts.
5267 */
5268 hpts_removed = 1;
5269 tcp_hpts_remove(bbr->rc_inp, HPTS_REMOVE_OUTPUT);
5270 if (bbr->r_ctl.rc_last_delay_val) {
5271 /* Update the last hptsi delay too */
5272 uint32_t time_since_send;
5273
5274 if (TSTMP_GT(cts, bbr->rc_pacer_started))
5275 time_since_send = cts - bbr->rc_pacer_started;
5276 else
5277 time_since_send = 0;
5278 if (bbr->r_ctl.rc_last_delay_val > time_since_send) {
5279 /* Cut down our slot time */
5280 bbr->r_ctl.rc_last_delay_val -= time_since_send;
5281 } else {
5282 bbr->r_ctl.rc_last_delay_val = 0;
5283 }
5284 bbr->rc_pacer_started = cts;
5285 }
5286 }
5287 bbr->rc_timer_first = 0;
5288 bbr_log_to_cancel(bbr, line, cts, hpts_removed);
5289 bbr->rc_tmr_stopped = bbr->r_ctl.rc_hpts_flags & PACE_TMR_MASK;
5290 bbr->r_ctl.rc_hpts_flags &= ~(PACE_TMR_MASK);
5291 }
5292}
5293
5294static void
5295bbr_timer_stop(struct tcpcb *tp, uint32_t timer_type)

Callers 9

bbr_timer_auditFunction · 0.85
bbr_cong_signalFunction · 0.85
bbr_process_ackFunction · 0.85
bbr_enter_persistFunction · 0.85
bbr_process_dataFunction · 0.85
bbr_do_fastnewdataFunction · 0.85
bbr_fastackFunction · 0.85
bbr_do_syn_sentFunction · 0.85
bbr.cFile · 0.85

Calls 1

bbr_log_to_cancelFunction · 0.85

Tested by

no test coverage detected