| 1579 | } |
| 1580 | |
| 1581 | static uint16_t |
| 1582 | rack_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 | } |
| 1609 | configured_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 | |
| 1617 | static uint64_t |
| 1618 | rack_get_output_bw(struct tcp_rack *rack, uint64_t bw, struct rack_sendmap *rsm) |
no outgoing calls
no test coverage detected