diff --git a/src/quic_cc_cubic.c b/src/quic_cc_cubic.c index 4bd1a7ce4..51d11b11c 100644 --- a/src/quic_cc_cubic.c +++ b/src/quic_cc_cubic.c @@ -640,3 +640,11 @@ struct quic_cc_algo quic_cc_algo_cubic = { .hystart_start_round = quic_cc_cubic_hystart_start_round, .state_trace = quic_cc_cubic_state_trace, }; + +void quic_cc_cubic_check(void) +{ + struct quic_cc *cc; + BUG_ON_HOT(sizeof(struct cubic) > sizeof(cc->priv)); +} + +INITCALL0(STG_REGISTER, quic_cc_cubic_check); diff --git a/src/quic_cc_newreno.c b/src/quic_cc_newreno.c index ca298776c..4d035b551 100644 --- a/src/quic_cc_newreno.c +++ b/src/quic_cc_newreno.c @@ -223,3 +223,10 @@ struct quic_cc_algo quic_cc_algo_nr = { .state_trace = quic_cc_nr_state_trace, }; +void quic_cc_nr_check(void) +{ + struct quic_cc *cc; + BUG_ON_HOT(sizeof(struct nr) > sizeof(cc->priv)); +} + +INITCALL0(STG_REGISTER, quic_cc_nr_check);