Browse Source

fix: remove tautological BBR_EXTRA_ACKED_GAIN checks

etcp-inflight-fix
Evgeny 4 months ago
parent
commit
51d5790938
  1. 11
      src/etcp_bbr.c

11
src/etcp_bbr.c

@ -81,11 +81,9 @@ static uint32_t bbr_ack_aggregation_cwnd(const struct bbr* bbr, uint32_t mss)
{
uint32_t max_aggr_cwnd, aggr_cwnd = 0;
(void)mss;
if (BBR_EXTRA_ACKED_GAIN) {
max_aggr_cwnd = (uint32_t)((uint64_t)bbr_bw(bbr) * 100000U / BW_UNIT);
aggr_cwnd = (uint32_t)((uint32_t)BBR_EXTRA_ACKED_GAIN * bbr_extra_acked(bbr) >> BBR_SCALE);
aggr_cwnd = (uint32_t)(aggr_cwnd < max_aggr_cwnd ? aggr_cwnd : max_aggr_cwnd);
}
max_aggr_cwnd = (uint32_t)((uint64_t)bbr_bw(bbr) * 100000U / BW_UNIT);
aggr_cwnd = (uint32_t)((uint32_t)BBR_EXTRA_ACKED_GAIN * bbr_extra_acked(bbr) >> BBR_SCALE);
aggr_cwnd = (uint32_t)(aggr_cwnd < max_aggr_cwnd ? aggr_cwnd : max_aggr_cwnd);
return aggr_cwnd;
}
@ -663,8 +661,7 @@ static void bbr_update_ack_aggregation(struct bbr* bbr, const struct bbr_rate_sa
uint64_t now_us;
(void)mss;
if (!BBR_EXTRA_ACKED_GAIN || rs->acked_sacked <= 0 ||
rs->interval_us <= 0)
if (rs->acked_sacked <= 0 || rs->interval_us <= 0)
return;
if (bbr->round_start) {

Loading…
Cancel
Save