mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-24 04:11:02 +01:00
MINOR: quic: Update K CUBIC calculation (RFC 9438)
The new formula for K CUBIC which arrives with RFC 9438 is as follows:
K = cubic_root((W_max - cwnd_epoch) / C)
Note that W_max is c->last_w_max, and cwnd_epoch is c->cwnd when entering
quic_cubic_update() just after a congestion event.
Must be backported as far as 2.6.
This commit is contained in:
parent
406c63ba44
commit
2ed53ae4a0
@ -241,8 +241,7 @@ static inline void quic_cubic_update(struct quic_cc *cc, uint32_t acked)
|
||||
* K = cubic_root((W_max - cwnd_epoch)/C) (Figure 2)
|
||||
* Note that K is stored in milliseconds.
|
||||
*/
|
||||
c->K = cubic_root((c->last_w_max - path->cwnd) *
|
||||
(CUBIC_ONE_SCALED - CUBIC_BETA_SCALED) / (CUBIC_C_SCALED * path->mtu));
|
||||
c->K = cubic_root(((c->last_w_max - path->cwnd) << CUBIC_SCALE_FACTOR_SHIFT) / (CUBIC_C_SCALED * path->mtu));
|
||||
/* Convert to miliseconds. */
|
||||
c->K *= 1000;
|
||||
c->W_target = c->last_w_max;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user