MINOR: quic: Add packet loss and maximum cc window to "show quic"
Add the number of packet losts and the maximum congestion control window computed
by the algorithms to "show quic".
Same thing for the traces of existent congestion control algorithms.
Must be backported to 2.7 and 2.6.
diff --git a/src/quic_cc_cubic.c b/src/quic_cc_cubic.c
index 1a5fa4e..d22897b 100644
--- a/src/quic_cc_cubic.c
+++ b/src/quic_cc_cubic.c
@@ -168,6 +168,7 @@
}
path->cwnd += inc;
+ path->mcwnd = QUIC_MAX(path->cwnd, path->mcwnd);
leave:
TRACE_LEAVE(QUIC_EV_CONN_CC, cc->qc);
}
@@ -217,6 +218,7 @@
/* Exit to congestion avoidance if slow start threshold is reached. */
if (path->cwnd >= c->ssthresh)
c->state = QUIC_CC_ST_CA;
+ path->mcwnd = QUIC_MAX(path->cwnd, path->mcwnd);
break;
case QUIC_CC_EVT_LOSS:
@@ -309,9 +311,10 @@
struct cubic *c = quic_cc_priv(cc);
path = container_of(cc, struct quic_path, cc);
- chunk_appendf(buf, " state=%s cwnd=%llu ssthresh=%d rpst=%dms",
+ chunk_appendf(buf, " state=%s cwnd=%llu mcwnd=%llu ssthresh=%d rpst=%dms",
quic_cc_state_str(c->state),
(unsigned long long)path->cwnd,
+ (unsigned long long)path->mcwnd,
(int)c->ssthresh,
!tick_isset(c->recovery_start_time) ? -1 :
TICKS_TO_MS(tick_remain(c->recovery_start_time, now_ms)));