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

Function rack_apply_updated_usrtt

freebsd/netinet/tcp_stacks/rack.c:6586–6634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6584}
6585
6586static void
6587rack_apply_updated_usrtt(struct tcp_rack *rack, uint32_t us_rtt, uint32_t us_cts)
6588{
6589 /*
6590 * Apply to filter the inbound us-rtt at us_cts.
6591 */
6592 uint32_t old_rtt;
6593
6594 old_rtt = get_filter_value_small(&rack->r_ctl.rc_gp_min_rtt);
6595 apply_filter_min_small(&rack->r_ctl.rc_gp_min_rtt,
6596 us_rtt, us_cts);
6597 if (rack->r_ctl.last_pacing_time &&
6598 rack->rc_gp_dyn_mul &&
6599 (rack->r_ctl.last_pacing_time > us_rtt))
6600 rack->pacing_longer_than_rtt = 1;
6601 else
6602 rack->pacing_longer_than_rtt = 0;
6603 if (old_rtt > us_rtt) {
6604 /* We just hit a new lower rtt time */
6605 rack_log_rtt_shrinks(rack, us_cts, old_rtt,
6606 __LINE__, RACK_RTTS_NEWRTT);
6607 /*
6608 * Only count it if its lower than what we saw within our
6609 * calculated range.
6610 */
6611 if ((old_rtt - us_rtt) > rack_min_rtt_movement) {
6612 if (rack_probertt_lower_within &&
6613 rack->rc_gp_dyn_mul &&
6614 (rack->use_fixed_rate == 0) &&
6615 (rack->rc_always_pace)) {
6616 /*
6617 * We are seeing a new lower rtt very close
6618 * to the time that we would have entered probe-rtt.
6619 * This is probably due to the fact that a peer flow
6620 * has entered probe-rtt. Lets go in now too.
6621 */
6622 uint32_t val;
6623
6624 val = rack_probertt_lower_within * rack_time_between_probertt;
6625 val /= 100;
6626 if ((rack->in_probe_rtt == 0) &&
6627 ((us_cts - rack->r_ctl.rc_lower_rtt_us_cts) >= (rack_time_between_probertt - val))) {
6628 rack_enter_probertt(rack, us_cts);
6629 }
6630 }
6631 rack->r_ctl.rc_lower_rtt_us_cts = us_cts;
6632 }
6633 }
6634}
6635
6636static int
6637rack_update_rtt(struct tcpcb *tp, struct tcp_rack *rack,

Callers 2

rack_update_rttFunction · 0.85
rack_do_segment_nounlockFunction · 0.85

Calls 4

get_filter_value_smallFunction · 0.85
apply_filter_min_smallFunction · 0.85
rack_log_rtt_shrinksFunction · 0.85
rack_enter_proberttFunction · 0.85

Tested by

no test coverage detected