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

Function rack_timeout_rack

freebsd/netinet/tcp_stacks/rack.c:4983–5058  ·  view source on GitHub ↗

* RACK Timer, here we simply do logging and house keeping. * the normal rack_output() function will call the * appropriate thing to check if we need to do a RACK retransmit. * We return 1, saying don't proceed with rack_output only * when all timers have been stopped (destroyed PCB?). */

Source from the content-addressed store, hash-verified

4981 * when all timers have been stopped (destroyed PCB?).
4982 */
4983static int
4984rack_timeout_rack(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts)
4985{
4986 /*
4987 * This timer simply provides an internal trigger to send out data.
4988 * The check_recovery_mode call will see if there are needed
4989 * retransmissions, if so we will enter fast-recovery. The output
4990 * call may or may not do the same thing depending on sysctl
4991 * settings.
4992 */
4993 struct rack_sendmap *rsm;
4994 int32_t recovery;
4995
4996 if (tp->t_timers->tt_flags & TT_STOPPED) {
4997 return (1);
4998 }
4999 recovery = IN_RECOVERY(tp->t_flags);
5000 counter_u64_add(rack_to_tot, 1);
5001 if (rack->r_state && (rack->r_state != tp->t_state))
5002 rack_set_state(tp, rack);
5003 rack->rc_on_min_to = 0;
5004 rsm = rack_check_recovery_mode(tp, cts);
5005 rack_log_to_event(rack, RACK_TO_FRM_RACK, rsm);
5006 if (rsm) {
5007 uint32_t rtt;
5008
5009 rack->r_ctl.rc_resend = rsm;
5010 if (rack->use_rack_rr) {
5011 /*
5012 * Don't accumulate extra pacing delay
5013 * we are allowing the rack timer to
5014 * over-ride pacing i.e. rrr takes precedence
5015 * if the pacing interval is longer than the rrr
5016 * time (in other words we get the min pacing
5017 * time versus rrr pacing time).
5018 */
5019 rack->r_timer_override = 1;
5020 rack->r_ctl.rc_hpts_flags &= ~PACE_PKT_OUTPUT;
5021 }
5022 rtt = rack->rc_rack_rtt;
5023 if (rtt == 0)
5024 rtt = 1;
5025 if (rack->rack_no_prr == 0) {
5026 if ((recovery == 0) &&
5027 (rack->r_ctl.rc_prr_sndcnt < ctf_fixed_maxseg(tp))) {
5028 /*
5029 * The rack-timeout that enter's us into recovery
5030 * will force out one MSS and set us up so that we
5031 * can do one more send in 2*rtt (transitioning the
5032 * rack timeout into a rack-tlp).
5033 */
5034 rack->r_ctl.rc_prr_sndcnt = ctf_fixed_maxseg(tp);
5035 rack->r_timer_override = 1;
5036 rack_log_to_prr(rack, 3, 0);
5037 } else if ((rack->r_ctl.rc_prr_sndcnt < (rsm->r_end - rsm->r_start)) &&
5038 rack->use_rack_rr) {
5039 /*
5040 * When a rack timer goes, if the rack rr is

Callers 1

rack_process_timersFunction · 0.85

Calls 7

rack_set_stateFunction · 0.85
rack_check_recovery_modeFunction · 0.85
rack_log_to_eventFunction · 0.85
ctf_fixed_maxsegFunction · 0.85
rack_log_to_prrFunction · 0.85
rack_start_hpts_timerFunction · 0.85
counter_u64_addFunction · 0.50

Tested by

no test coverage detected