| 10993 | } |
| 10994 | |
| 10995 | static int32_t |
| 10996 | bbr_google_startup(struct tcp_bbr *bbr, uint32_t cts, int32_t pkt_epoch) |
| 10997 | { |
| 10998 | uint64_t btlbw, gain; |
| 10999 | if (pkt_epoch == 0) { |
| 11000 | /* |
| 11001 | * Need to be on a pkt-epoch to continue. |
| 11002 | */ |
| 11003 | return (0); |
| 11004 | } |
| 11005 | btlbw = bbr_get_full_bw(bbr); |
| 11006 | gain = ((bbr->r_ctl.rc_bbr_lastbtlbw * |
| 11007 | (uint64_t)bbr_start_exit) / (uint64_t)100) + bbr->r_ctl.rc_bbr_lastbtlbw; |
| 11008 | if (btlbw >= gain) { |
| 11009 | bbr->r_ctl.rc_bbr_last_startup_epoch = bbr->r_ctl.rc_pkt_epoch; |
| 11010 | bbr_log_startup_event(bbr, cts, bbr->r_ctl.rc_bbr_last_startup_epoch, |
| 11011 | bbr->r_ctl.rc_lost_at_startup, bbr_start_exit, 3); |
| 11012 | bbr->r_ctl.rc_bbr_lastbtlbw = btlbw; |
| 11013 | } |
| 11014 | if ((bbr->r_ctl.rc_pkt_epoch - bbr->r_ctl.rc_bbr_last_startup_epoch) >= BBR_STARTUP_EPOCHS) |
| 11015 | return (1); |
| 11016 | bbr_log_startup_event(bbr, cts, bbr->r_ctl.rc_bbr_last_startup_epoch, |
| 11017 | bbr->r_ctl.rc_lost_at_startup, bbr_start_exit, 8); |
| 11018 | return(0); |
| 11019 | } |
| 11020 | |
| 11021 | static int32_t inline |
| 11022 | bbr_state_startup(struct tcp_bbr *bbr, uint32_t cts, int32_t epoch, int32_t pkt_epoch) |
no test coverage detected