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

Function bbr_get_pacing_length

freebsd/netinet/tcp_stacks/bbr.c:3534–3548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3532}
3533
3534static uint32_t
3535bbr_get_pacing_length(struct tcp_bbr *bbr, uint16_t gain, uint32_t useconds_time, uint64_t bw)
3536{
3537 uint64_t divor, res, tim;
3538
3539 if (useconds_time == 0)
3540 return (0);
3541 gain = bbr_gain_adjust(bbr, gain);
3542 divor = (uint64_t)USECS_IN_SECOND * (uint64_t)BBR_UNIT;
3543 tim = useconds_time;
3544 res = (tim * bw * gain) / divor;
3545 if (res == 0)
3546 res = 1;
3547 return ((uint32_t)res);
3548}
3549
3550/*
3551 * Given a gain and a length return the delay in useconds that

Callers 1

tcp_bbr_tso_size_checkFunction · 0.85

Calls 1

bbr_gain_adjustFunction · 0.85

Tested by

no test coverage detected