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

Function rack_decrease_highrtt

freebsd/netinet/tcp_stacks/rack.c:2686–2707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2684}
2685
2686static uint32_t
2687rack_decrease_highrtt(struct tcp_rack *rack, uint32_t curper, uint32_t rtt)
2688{
2689 /*
2690 * highrttthresh
2691 * result = curper * (1 - (B * ( 1 - ------ ))
2692 * gp_srtt
2693 *
2694 * B = rack_gp_decrease_per (default 10%)
2695 * highrttthresh = filter_min * rack_gp_rtt_maxmul
2696 */
2697 uint64_t perf;
2698 uint32_t highrttthresh;
2699
2700 highrttthresh = get_filter_value_small(&rack->r_ctl.rc_gp_min_rtt) * rack_gp_rtt_maxmul;
2701
2702 perf = (((uint64_t)curper * ((uint64_t)1000000 -
2703 ((uint64_t)rack_gp_decrease_per * ((uint64_t)1000000 -
2704 ((uint64_t)highrttthresh * (uint64_t)1000000) /
2705 (uint64_t)rtt)) / 100)) /(uint64_t)1000000);
2706 return (perf);
2707}
2708
2709static void
2710rack_decrease_bw_mul(struct tcp_rack *rack, int timely_says, uint32_t rtt, int32_t rtt_diff)

Callers 1

rack_decrease_bw_mulFunction · 0.85

Calls 1

get_filter_value_smallFunction · 0.85

Tested by

no test coverage detected