| 6510 | } |
| 6511 | |
| 6512 | static void |
| 6513 | tcp_bbr_commit_bw(struct tcp_bbr *bbr, uint32_t cts) |
| 6514 | { |
| 6515 | uint64_t orig_bw; |
| 6516 | |
| 6517 | if (bbr->r_ctl.rc_bbr_cur_del_rate == 0) { |
| 6518 | /* We never apply a zero measurment */ |
| 6519 | bbr_log_type_bbrupd(bbr, 20, cts, 0, 0, |
| 6520 | 0, 0, 0, 0, 0, 0); |
| 6521 | return; |
| 6522 | } |
| 6523 | if (bbr->r_ctl.r_measurement_count < 0xffffffff) |
| 6524 | bbr->r_ctl.r_measurement_count++; |
| 6525 | orig_bw = get_filter_value(&bbr->r_ctl.rc_delrate); |
| 6526 | apply_filter_max(&bbr->r_ctl.rc_delrate, bbr->r_ctl.rc_bbr_cur_del_rate, bbr->r_ctl.rc_pkt_epoch); |
| 6527 | bbr_log_type_bbrupd(bbr, 21, cts, (uint32_t)orig_bw, |
| 6528 | (uint32_t)get_filter_value(&bbr->r_ctl.rc_delrate), |
| 6529 | 0, 0, 0, 0, 0, 0); |
| 6530 | if (orig_bw && |
| 6531 | (orig_bw != get_filter_value(&bbr->r_ctl.rc_delrate))) { |
| 6532 | if (bbr->bbr_hdrw_pacing) { |
| 6533 | /* |
| 6534 | * Apply a new rate to the hardware |
| 6535 | * possibly. |
| 6536 | */ |
| 6537 | bbr_update_hardware_pacing_rate(bbr, cts); |
| 6538 | } |
| 6539 | bbr_set_state_target(bbr, __LINE__); |
| 6540 | tcp_bbr_tso_size_check(bbr, cts); |
| 6541 | if (bbr->r_recovery_bw) { |
| 6542 | bbr_setup_red_bw(bbr, cts); |
| 6543 | bbr_log_type_bw_reduce(bbr, BBR_RED_BW_USELRBW); |
| 6544 | } |
| 6545 | } else if ((orig_bw == 0) && get_filter_value(&bbr->r_ctl.rc_delrate)) |
| 6546 | tcp_bbr_tso_size_check(bbr, cts); |
| 6547 | } |
| 6548 | |
| 6549 | static void |
| 6550 | bbr_nf_measurement(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t rtt, uint32_t cts) |
no test coverage detected