mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-13 02:26:56 +02:00
MINOR: quic: Wrong smoothed rtt initialization
In ->srtt we store 8*srtt to ease the srtt computations with this formula: srtt = 7/8 * srtt + 1/8 * adjusted_rtt But its initialization was wrong.
This commit is contained in:
parent
91379f79f8
commit
eca47d9a8a
@ -40,7 +40,7 @@
|
|||||||
struct quic_loss {
|
struct quic_loss {
|
||||||
/* The most recent RTT measurement. */
|
/* The most recent RTT measurement. */
|
||||||
unsigned int latest_rtt;
|
unsigned int latest_rtt;
|
||||||
/* Smoothed RTT << 4*/
|
/* Smoothed RTT << 3 */
|
||||||
unsigned int srtt;
|
unsigned int srtt;
|
||||||
/* RTT variation << 2 */
|
/* RTT variation << 2 */
|
||||||
unsigned int rtt_var;
|
unsigned int rtt_var;
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
static inline void quic_loss_init(struct quic_loss *ql)
|
static inline void quic_loss_init(struct quic_loss *ql)
|
||||||
{
|
{
|
||||||
ql->srtt = QUIC_LOSS_INITIAL_RTT << 4;
|
ql->srtt = QUIC_LOSS_INITIAL_RTT << 3;
|
||||||
ql->rtt_var = (QUIC_LOSS_INITIAL_RTT >> 1) << 2;
|
ql->rtt_var = (QUIC_LOSS_INITIAL_RTT >> 1) << 2;
|
||||||
ql->rtt_min = 0;
|
ql->rtt_min = 0;
|
||||||
ql->pto_count = 0;
|
ql->pto_count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user