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

Function bbr_google_startup

freebsd/netinet/tcp_stacks/bbr.c:10995–11019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10993}
10994
10995static int32_t
10996bbr_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
11021static int32_t inline
11022bbr_state_startup(struct tcp_bbr *bbr, uint32_t cts, int32_t epoch, int32_t pkt_epoch)

Callers 1

bbr_state_startupFunction · 0.85

Calls 2

bbr_get_full_bwFunction · 0.85
bbr_log_startup_eventFunction · 0.85

Tested by

no test coverage detected