Skip to content

Commit

Permalink
add pacer support to pico
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed Nov 6, 2023
1 parent adb3079 commit 597011c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/cc-pico.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* IN THE SOFTWARE.
*/
#include <math.h>
#include "quicly/pacer.h"
#include "quicly/cc.h"
#include "quicly.h"

Expand Down Expand Up @@ -102,6 +103,9 @@ static void pico_on_lost(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t by
return;
cc->recovery_end = next_pn;

/* switch pacer to congestion avoidance mode the moment loss is observed */
cc->pacer_multiplier = QUICLY_PACER_CALC_MULTIPLIER(1.2);

++cc->num_loss_episodes;
if (cc->cwnd_exiting_slow_start == 0)
cc->cwnd_exiting_slow_start = cc->cwnd;
Expand Down Expand Up @@ -144,6 +148,7 @@ static void pico_reset(quicly_cc_t *cc, uint32_t initcwnd)
.cwnd_maximum = initcwnd,
.cwnd_minimum = UINT32_MAX,
.ssthresh = UINT32_MAX,
.pacer_multiplier = QUICLY_PACER_CALC_MULTIPLIER(2),
};
pico_init_pico_state(cc, 0);
}
Expand Down

0 comments on commit 597011c

Please sign in to comment.