MINOR: quic: Stop hardcoding a scale shifting value (CUBIC_BETA_SCALE_FACTOR_SHIFT)

Very minor modification to replace a statement with an hardcoded value by a macro.

Should be backported as far as 2.6 to ease any further modification to come.
This commit is contained in:
Frederic Lecaille 2024-01-25 07:55:33 +01:00
parent 574cf3fe00
commit 96385f40b5
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ static inline void quic_cubic_update(struct quic_cc *cc, uint32_t acked)
goto leave; goto leave;
} }
delta = path->mtu * ((CUBIC_C * diff * diff * diff) >> (10 + 3 * TIME_SCALE_FACTOR_SHIFT)); delta = path->mtu * ((CUBIC_C * diff * diff * diff) >> (CUBIC_BETA_SCALE_SHIFT + 3 * TIME_SCALE_FACTOR_SHIFT));
if (t < c->K) if (t < c->K)
target = c->origin_point - delta; target = c->origin_point - delta;
else else