Skip to content

Commit 269dfb9

Browse files
committed
MINOR: quic: Implement ->pacing_delay_ns cc callback for cubic
This callback returns the pacing delay in nanoseconds between packet (or bursts) to be sent. This is what is computed by quic_pacing_ns_pkt().
1 parent 46e9053 commit 269dfb9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/quic_cc_cubic.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <haproxy/global-t.h>
22
#include <haproxy/quic_cc.h>
33
#include <haproxy/quic_cc_hystart.h>
4+
#include <haproxy/quic_pacing.h>
45
#include <haproxy/quic_trace.h>
56
#include <haproxy/ticks.h>
67
#include <haproxy/trace.h>
@@ -680,12 +681,18 @@ static void quic_cc_cubic_state_cli(struct buffer *buf, const struct quic_cc_pat
680681
(long long)(path->cwnd - c->last_w_max));
681682
}
682683

684+
unsigned long long quic_cc_cubic_pacing_delay_ns(const struct quic_cc *cc)
685+
{
686+
return quic_pacing_ns_pkt(&cc->qc->qcc->tx.pacer);
687+
}
688+
683689
struct quic_cc_algo quic_cc_algo_cubic = {
684690
.type = QUIC_CC_ALGO_TP_CUBIC,
685691
.init = quic_cc_cubic_init,
686692
.event = quic_cc_cubic_event,
687693
.slow_start = quic_cc_cubic_slow_start,
688694
.hystart_start_round = quic_cc_cubic_hystart_start_round,
695+
.pacing_delay_ns = quic_cc_cubic_pacing_delay_ns,
689696
.state_trace = quic_cc_cubic_state_trace,
690697
.state_cli = quic_cc_cubic_state_cli,
691698
};

0 commit comments

Comments
 (0)