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

Function rack_set_prtt_target

freebsd/netinet/tcp_stacks/rack.c:2880–2897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2878}
2879
2880static void
2881rack_set_prtt_target(struct tcp_rack *rack, uint32_t segsiz, uint32_t rtt)
2882{
2883 uint64_t bwdp;
2884
2885 bwdp = rack_get_bw(rack);
2886 bwdp *= (uint64_t)rtt;
2887 bwdp /= (uint64_t)HPTS_USEC_IN_SEC;
2888 rack->r_ctl.rc_target_probertt_flight = roundup((uint32_t)bwdp, segsiz);
2889 if (rack->r_ctl.rc_target_probertt_flight < (segsiz * rack_timely_min_segs)) {
2890 /*
2891 * A window protocol must be able to have 4 packets
2892 * outstanding as the floor in order to function
2893 * (especially considering delayed ack :D).
2894 */
2895 rack->r_ctl.rc_target_probertt_flight = (segsiz * rack_timely_min_segs);
2896 }
2897}
2898
2899static void
2900rack_enter_probertt(struct tcp_rack *rack, uint32_t us_cts)

Callers 2

rack_enter_proberttFunction · 0.85
rack_exit_proberttFunction · 0.85

Calls 1

rack_get_bwFunction · 0.85

Tested by

no test coverage detected