| 3532 | } |
| 3533 | |
| 3534 | static uint32_t |
| 3535 | bbr_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 |
no test coverage detected