BUG/MINOR: quic: Missing time threshold multiplifier for loss delay computation

It seems this multiplier ended up in oblivion. Indeed a multiplier must be
applied to the loss delay expressed as an RTT multiplier: 9/8.

So, some packets were detected as lost too soon, leading to be retransmitted too
early!
This commit is contained in:
Frédéric Lécaille 2022-04-29 16:00:17 +02:00 committed by Amaury Denoyelle
parent 1601395063
commit c40e19d711
2 changed files with 8 additions and 1 deletions

View File

@ -33,6 +33,12 @@
#define QUIC_TIMER_GRANULARITY 1U /* 1ms */ #define QUIC_TIMER_GRANULARITY 1U /* 1ms */
#define QUIC_LOSS_INITIAL_RTT 333U /* 333ms */ #define QUIC_LOSS_INITIAL_RTT 333U /* 333ms */
/* QUIC loss time threshold expressed an RTT multiplier
* (QUIC_LOSS_TIME_THRESHOLD_MULTIPLICAND / QUIC_LOSS_TIME_THRESHOLD_DIVISOR)
*/
#define QUIC_LOSS_TIME_THRESHOLD_MULTIPLICAND 9
#define QUIC_LOSS_TIME_THRESHOLD_DIVISOR 8
/* Note that all the unit of variables for QUIC LOSS dectections /* Note that all the unit of variables for QUIC LOSS dectections
* is the tick. * is the tick.
*/ */

View File

@ -154,7 +154,8 @@ void qc_packet_loss_lookup(struct quic_pktns *pktns, struct quic_conn *qc,
ql = &qc->path->loss; ql = &qc->path->loss;
loss_delay = QUIC_MAX(ql->latest_rtt, ql->srtt >> 3); loss_delay = QUIC_MAX(ql->latest_rtt, ql->srtt >> 3);
loss_delay = QUIC_MAX(loss_delay, MS_TO_TICKS(QUIC_TIMER_GRANULARITY)); loss_delay = QUIC_MAX(loss_delay, MS_TO_TICKS(QUIC_TIMER_GRANULARITY)) *
QUIC_LOSS_TIME_THRESHOLD_MULTIPLICAND / QUIC_LOSS_TIME_THRESHOLD_DIVISOR;
node = eb64_first(pkts); node = eb64_first(pkts);
while (node) { while (node) {