void (*event)(struct quic_cc *cc, struct quic_cc_event *ev);
void (*slow_start)(struct quic_cc *cc);
void (*state_trace)(struct buffer *buf, const struct quic_cc *cc);
+ void (*state_cli)(struct buffer *buf, const struct quic_cc_path *path);
void (*hystart_start_round)(struct quic_cc *cc, uint64_t pn);
};
TICKS_TO_MS(tick_remain(c->recovery_start_time, now_ms)));
}
+static void quic_cc_cubic_state_cli(struct buffer *buf, const struct quic_cc_path *path)
+{
+ struct cubic *c = quic_cc_priv(&path->cc);
+
+ chunk_appendf(buf, " cc: state=%s ssthresh=%u K=%u last_w_max=%u wdiff=%ld\n",
+ quic_cc_state_str(c->state), c->ssthresh, c->K, c->last_w_max,
+ (int64_t)(path->cwnd - c->last_w_max));
+}
+
struct quic_cc_algo quic_cc_algo_cubic = {
.type = QUIC_CC_ALGO_TP_CUBIC,
.init = quic_cc_cubic_init,
.slow_start = quic_cc_cubic_slow_start,
.hystart_start_round = quic_cc_cubic_hystart_start_round,
.state_trace = quic_cc_cubic_state_trace,
+ .state_cli = quic_cc_cubic_state_cli,
};
void quic_cc_cubic_check(void)
}
if (ctx->fields & QUIC_DUMP_FLD_CC) {
+ if (qc->path->cc.algo->state_cli)
+ qc->path->cc.algo->state_cli(&trash, qc->path);
+
chunk_appendf(&trash, " srtt=%-4u rttvar=%-4u rttmin=%-4u ptoc=%-4u\n"
" cwnd=%-6llu mcwnd=%-6llu\n"
" sentbytes=%-12llu sentbytesgso=%-12llu sentpkts=%-6llu\n"