* 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?). */
| 4981 | * when all timers have been stopped (destroyed PCB?). |
| 4982 | */ |
| 4983 | static int |
| 4984 | rack_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 |
no test coverage detected