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

Function tcp_bbr_commit_bw

freebsd/netinet/tcp_stacks/bbr.c:6512–6547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6510}
6511
6512static void
6513tcp_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
6549static void
6550bbr_nf_measurement(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t rtt, uint32_t cts)

Callers 2

bbr_nf_measurementFunction · 0.85
bbr_google_measurementFunction · 0.85

Calls 8

bbr_log_type_bbrupdFunction · 0.85
get_filter_valueFunction · 0.85
apply_filter_maxFunction · 0.85
bbr_set_state_targetFunction · 0.85
tcp_bbr_tso_size_checkFunction · 0.85
bbr_setup_red_bwFunction · 0.85
bbr_log_type_bw_reduceFunction · 0.85

Tested by

no test coverage detected