* RACK Timer, here we simply do logging and house keeping. * the normal bbr_output_wtime() function will call the * appropriate thing to check if we need to do a RACK retransmit. * We return 1, saying don't proceed with bbr_output_wtime only * when all timers have been stopped (destroyed PCB?). */
| 4367 | * when all timers have been stopped (destroyed PCB?). |
| 4368 | */ |
| 4369 | static int |
| 4370 | bbr_timeout_rack(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts) |
| 4371 | { |
| 4372 | /* |
| 4373 | * This timer simply provides an internal trigger to send out data. |
| 4374 | * The check_recovery_mode call will see if there are needed |
| 4375 | * retransmissions, if so we will enter fast-recovery. The output |
| 4376 | * call may or may not do the same thing depending on sysctl |
| 4377 | * settings. |
| 4378 | */ |
| 4379 | uint32_t lost; |
| 4380 | |
| 4381 | if (bbr->rc_all_timers_stopped) { |
| 4382 | return (1); |
| 4383 | } |
| 4384 | if (TSTMP_LT(cts, bbr->r_ctl.rc_timer_exp)) { |
| 4385 | /* Its not time yet */ |
| 4386 | return (0); |
| 4387 | } |
| 4388 | BBR_STAT_INC(bbr_to_tot); |
| 4389 | lost = bbr->r_ctl.rc_lost; |
| 4390 | if (bbr->r_state && (bbr->r_state != tp->t_state)) |
| 4391 | bbr_set_state(tp, bbr, 0); |
| 4392 | bbr_log_to_event(bbr, cts, BBR_TO_FRM_RACK); |
| 4393 | if (bbr->r_ctl.rc_resend == NULL) { |
| 4394 | /* Lets do the check here */ |
| 4395 | bbr->r_ctl.rc_resend = bbr_check_recovery_mode(tp, bbr, cts); |
| 4396 | } |
| 4397 | if (bbr_policer_call_from_rack_to) |
| 4398 | bbr_lt_bw_sampling(bbr, cts, (bbr->r_ctl.rc_lost > lost)); |
| 4399 | bbr->r_ctl.rc_hpts_flags &= ~PACE_TMR_RACK; |
| 4400 | return (0); |
| 4401 | } |
| 4402 | |
| 4403 | static __inline void |
| 4404 | bbr_clone_rsm(struct tcp_bbr *bbr, struct bbr_sendmap *nrsm, struct bbr_sendmap *rsm, uint32_t start) |
no test coverage detected