| 3504 | } |
| 3505 | |
| 3506 | static uint32_t |
| 3507 | bbr_get_header_oh(struct tcp_bbr *bbr) |
| 3508 | { |
| 3509 | int seg_oh; |
| 3510 | |
| 3511 | seg_oh = 0; |
| 3512 | if (bbr->r_ctl.rc_inc_tcp_oh) { |
| 3513 | /* Do we include TCP overhead? */ |
| 3514 | seg_oh = (bbr->rc_last_options + sizeof(struct tcphdr)); |
| 3515 | } |
| 3516 | if (bbr->r_ctl.rc_inc_ip_oh) { |
| 3517 | /* Do we include IP overhead? */ |
| 3518 | #ifdef INET6 |
| 3519 | if (bbr->r_is_v6) |
| 3520 | seg_oh += sizeof(struct ip6_hdr); |
| 3521 | else |
| 3522 | #endif |
| 3523 | #ifdef INET |
| 3524 | seg_oh += sizeof(struct ip); |
| 3525 | #endif |
| 3526 | } |
| 3527 | if (bbr->r_ctl.rc_inc_enet_oh) { |
| 3528 | /* Do we include the ethernet overhead? */ |
| 3529 | seg_oh += sizeof(struct ether_header); |
| 3530 | } |
| 3531 | return(seg_oh); |
| 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) |
no outgoing calls
no test coverage detected