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

Function rack_get_output_gain

freebsd/netinet/tcp_stacks/rack.c:1581–1615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1579}
1580
1581static uint16_t
1582rack_get_output_gain(struct tcp_rack *rack, struct rack_sendmap *rsm)
1583{
1584 if (rack->use_fixed_rate) {
1585 return (100);
1586 } else if (rack->in_probe_rtt && (rsm == NULL))
1587 return(rack->r_ctl.rack_per_of_gp_probertt);
1588 else if ((IN_RECOVERY(rack->rc_tp->t_flags) &&
1589 rack->r_ctl.rack_per_of_gp_rec)) {
1590 if (rsm) {
1591 /* a retransmission always use the recovery rate */
1592 return(rack->r_ctl.rack_per_of_gp_rec);
1593 } else if (rack->rack_rec_nonrxt_use_cr) {
1594 /* Directed to use the configured rate */
1595 goto configured_rate;
1596 } else if (rack->rack_no_prr &&
1597 (rack->r_ctl.rack_per_of_gp_rec > 100)) {
1598 /* No PRR, lets just use the b/w estimate only */
1599 return(100);
1600 } else {
1601 /*
1602 * Here we may have a non-retransmit but we
1603 * have no overrides, so just use the recovery
1604 * rate (prr is in effect).
1605 */
1606 return(rack->r_ctl.rack_per_of_gp_rec);
1607 }
1608 }
1609configured_rate:
1610 /* For the configured rate we look at our cwnd vs the ssthresh */
1611 if (rack->r_ctl.cwnd_to_use < rack->rc_tp->snd_ssthresh)
1612 return (rack->r_ctl.rack_per_of_gp_ss);
1613 else
1614 return(rack->r_ctl.rack_per_of_gp_ca);
1615}
1616
1617static uint64_t
1618rack_get_output_bw(struct tcp_rack *rack, uint64_t bw, struct rack_sendmap *rsm)

Callers 3

rack_get_output_bwFunction · 0.85
rack.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected