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

Function rack_timer_cancel

freebsd/netinet/tcp_stacks/rack.c:5872–5907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5870}
5871
5872static void
5873rack_timer_cancel(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts, int line)
5874{
5875 struct timeval tv;
5876 uint32_t us_cts, flags_on_entry;
5877 uint8_t hpts_removed = 0;
5878
5879 flags_on_entry = rack->r_ctl.rc_hpts_flags;
5880 us_cts = tcp_get_usecs(&tv);
5881 if ((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) &&
5882 ((TSTMP_GEQ(us_cts, rack->r_ctl.rc_last_output_to)) ||
5883 ((tp->snd_max - tp->snd_una) == 0))) {
5884 tcp_hpts_remove(rack->rc_inp, HPTS_REMOVE_OUTPUT);
5885 hpts_removed = 1;
5886 /* If we were not delayed cancel out the flag. */
5887 if ((tp->snd_max - tp->snd_una) == 0)
5888 rack->r_ctl.rc_hpts_flags &= ~PACE_PKT_OUTPUT;
5889 rack_log_to_cancel(rack, hpts_removed, line, us_cts, &tv, flags_on_entry);
5890 }
5891 if (rack->r_ctl.rc_hpts_flags & PACE_TMR_MASK) {
5892 rack->rc_tmr_stopped = rack->r_ctl.rc_hpts_flags & PACE_TMR_MASK;
5893 if (rack->rc_inp->inp_in_hpts &&
5894 ((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) == 0)) {
5895 /*
5896 * Canceling timer's when we have no output being
5897 * paced. We also must remove ourselves from the
5898 * hpts.
5899 */
5900 tcp_hpts_remove(rack->rc_inp, HPTS_REMOVE_OUTPUT);
5901 hpts_removed = 1;
5902 }
5903 rack->r_ctl.rc_hpts_flags &= ~(PACE_TMR_MASK);
5904 }
5905 if (hpts_removed == 0)
5906 rack_log_to_cancel(rack, hpts_removed, line, us_cts, &tv, flags_on_entry);
5907}
5908
5909static void
5910rack_timer_stop(struct tcpcb *tp, uint32_t timer_type)

Callers 10

rack_enter_persistFunction · 0.85
rack_remxt_tmrFunction · 0.85
rack_log_ackFunction · 0.85
rack_process_ackFunction · 0.85
rack_handle_delayed_ackFunction · 0.85
rack_process_dataFunction · 0.85
rack_fastackFunction · 0.85
rack_do_syn_sentFunction · 0.85
rack_timer_auditFunction · 0.85
rack.cFile · 0.85

Calls 2

tcp_get_usecsFunction · 0.85
rack_log_to_cancelFunction · 0.85

Tested by

no test coverage detected