Skip to content

Commit d2110c9

Browse files
committed
TO BE MERGED into delivery rate sampling implementation.
1 parent c81f06e commit d2110c9

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

include/haproxy/quic_cc_drs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
#include <haproxy/window_filter.h>
44

5-
#define false 0
6-
#define true 1
7-
85
/* Rate sample */
96
struct quic_cc_rs {
107
uint64_t delivered;

src/quic_cc_drs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ static void quic_cc_rs_init(struct quic_cc_rs *rs)
2727
void quic_cc_drs_init(struct quic_cc_drs *drs)
2828
{
2929
quic_cc_rs_init(&drs->rs);
30-
wf_init(&drs->wf, 12);
30+
wf_init(&drs->wf, 12, 0, ~0U);
3131
drs->round_count = 0;
3232
drs->next_round_delivered = 0;
3333
drs->delivered = 0;
3434
drs->lost = 0;
3535
drs->last_seq = -1;
3636
drs->delivered_time = TICK_ETERNITY;
3737
drs->first_sent_time = TICK_ETERNITY;
38-
drs->app_limited = false;
39-
drs->is_cwnd_limited = false;
38+
drs->app_limited = 0;
39+
drs->is_cwnd_limited = 0;
4040
}
4141

4242
/* Update <pkt> TX packet rate sampling information.
@@ -152,8 +152,8 @@ void quic_cc_drs_on_ack_recv(struct quic_cc_drs *drs, struct quic_cc_path *path,
152152
return;
153153

154154
rate = rs->delivered * 1000 / rs->interval;
155-
if (rate >= wf_get_best(&drs->wf) || !drs->app_limited) {
156-
wf_update(&drs->wf, rate, drs->round_count);
157-
path->delivery_rate = wf_get_best(&drs->wf);
155+
if (rate >= wf_get_max(&drs->wf) || !drs->app_limited) {
156+
wf_max_update(&drs->wf, rate, drs->round_count);
157+
path->delivery_rate = wf_get_max(&drs->wf);
158158
}
159159
}

0 commit comments

Comments
 (0)