Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ SET(QUICLY_LIBRARY_FILES
lib/retire_cid.c
lib/sendstate.c
lib/ss-rfc2001.c
lib/ss-hybla.c
lib/ss-hystart.c
lib/ss-search.c
lib/sentmap.c
lib/streambuf.c
Expand Down
30 changes: 7 additions & 23 deletions include/quicly/cc.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,10 @@ extern "C" {
#define QUICLY_MIN_CWND 2
#define QUICLY_RENO_BETA 0.7

#define SEARCH_DELV_BIN_COUNT 10 //
#define SEARCH_SENT_BIN_COUNT (25) // 10 + 15 extra bins
#define SEARCH_WINDOW_MULTIPLIER (3.5)
#define SEARCH_THRESH (0.35)

#define QUICLY_HYBLA_RTT0 (25)
#define QUICLY_HYBLA_RHO_LIM (16)

// #define SEARCH_EXIT
#define QUICLY_SEARCH_DELV_BIN_COUNT 10 // number of search delivered bytes bins
Comment thread
parvit marked this conversation as resolved.
Outdated
#define QUICLY_SEARCH_SENT_BIN_COUNT (25) // number of search sent bytes bins
Comment thread
parvit marked this conversation as resolved.
Outdated
#define QUICLY_SEARCH_WINDOW_MULTIPLIER (3.5) // search multiplier for window calculation
#define QUICLY_SEARCH_THRESH (0.35) // search threshold to stop slow start phase
Comment thread
parvit marked this conversation as resolved.
Outdated

/**
* Holds pointers to concrete congestion control implementation functions.
Expand All @@ -72,22 +67,11 @@ typedef struct st_quicly_cc_t {
* Slow-start specific data storage
*/
union {
struct {
double rho;
} hybla;
struct {
uint8_t found;
int64_t round_start;
int64_t last_ack;
int64_t end_seq;
uint32_t min_round_rtt;
uint8_t samples;
} hystart;
struct {
/**
* Bins for the byte count sent and the byte count delivered (instantiated on init)
*/
uint64_t delv_bins[SEARCH_SENT_BIN_COUNT];
uint64_t delv_bins[QUICLY_SEARCH_SENT_BIN_COUNT];
/**
* Maintains the end time of the current bin
*/
Expand Down Expand Up @@ -248,9 +232,9 @@ struct st_quicly_cc_type_t {
*/
int (*cc_switch)(quicly_cc_t *cc);
/*
* Defines a variable slowstart callback
* Defines a slowstart callback
*/
struct st_quicly_variable_ss *cc_slowstart;
struct st_quicly_ss_type_t *cc_slowstart;
/**
*
*/
Expand Down
20 changes: 2 additions & 18 deletions include/quicly/ss.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,24 @@ extern "C" {
#include <stdint.h>
#include <stdbool.h>

extern bool search_exit;

#define MIN(x,y) ((x > y) ? (y) : (x))
#define MAX(x,y) ((x < y) ? (y) : (x))
Comment thread
parvit marked this conversation as resolved.
Outdated

/**
* Holds pointers to concrete congestion control implementation functions.
*/
typedef const struct st_quicly_ss_type_t quicly_ss_type_t;
typedef struct st_quicly_ss_type_t quicly_ss_type_t;

struct st_quicly_ss_type_t {
const char* name;
void (*ss)(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t bytes, uint64_t largest_acked, uint32_t inflight,
uint64_t next_pn, int64_t now, uint32_t max_udp_payload_size);
};

extern quicly_ss_type_t quicly_ss_type_rfc2001, quicly_ss_type_hybla, quicly_ss_type_hystart, quicly_ss_type_search;
extern quicly_ss_type_t quicly_ss_type_rfc2001, quicly_ss_type_search, quicly_ss_type_none;
Comment thread
parvit marked this conversation as resolved.
Outdated

extern quicly_ss_type_t* quicly_ss_all_types[];

/* TODO
* The implementation of slow start algorithm (RFC 2001 https://datatracker.ietf.org/doc/rfc2001/
*
* LIF: did not see the implementation of this function
*/
void ss_quicly_slowstart(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t bytes, uint64_t largest_acked, uint32_t inflight,
uint64_t next_pn, int64_t now, uint32_t max_udp_payload_size);

struct st_quicly_variable_ss {
quicly_ss_type_t* slowstart;
};

extern struct st_quicly_variable_ss active_slowstart;

#ifdef __cplusplus
}
#endif
Expand Down
19 changes: 5 additions & 14 deletions lib/cc-cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,11 @@ static void cubic_on_acked(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t

/* Slow start. */
if (cc->cwnd < cc->ssthresh) {
#if 0
cc->cwnd += bytes;
if (cc->cwnd_maximum < cc->cwnd)
cc->cwnd_maximum = cc->cwnd;
#else
if (cc_limited) {
cc->type->cc_slowstart->slowstart->ss(cc, loss, bytes, largest_acked, inflight, next_pn, now, max_udp_payload_size);
} else {
if (cc_limited) {
cc->type->cc_slowstart->ss(cc, loss, bytes, largest_acked, inflight, next_pn, now, max_udp_payload_size);
} else {
Comment thread
parvit marked this conversation as resolved.
Outdated
fprintf(stderr, "cc_limited: %d \n", cc_limited);
}

#endif
}
return;
}

Expand Down Expand Up @@ -215,9 +208,7 @@ static void cubic_init(quicly_init_cc_t *self, quicly_cc_t *cc, uint32_t initcwn
cubic_reset(cc, initcwnd);
}

struct st_quicly_variable_ss cubic_active_slowstart = {&quicly_default_ss};

quicly_cc_type_t quicly_cc_type_cubic = {"cubic", &quicly_cc_cubic_init, cubic_on_acked,
cubic_on_lost, cubic_on_persistent_congestion, cubic_on_sent,
cubic_on_switch, &cubic_active_slowstart, quicly_cc_jumpstart_enter};
cubic_on_switch, &quicly_default_ss, quicly_cc_jumpstart_enter};
quicly_init_cc_t quicly_cc_cubic_init = {cubic_init};
2 changes: 1 addition & 1 deletion lib/cc-pico.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,6 @@ static void pico_init(quicly_init_cc_t *self, quicly_cc_t *cc, uint32_t initcwnd

quicly_cc_type_t quicly_cc_type_pico = {"pico", &quicly_cc_pico_init, pico_on_acked,
pico_on_lost, pico_on_persistent_congestion, pico_on_sent,
pico_on_switch, NULL /* no slow start exists for this CCA*/,
pico_on_switch, &quicly_ss_type_none,
quicly_cc_jumpstart_enter};
quicly_init_cc_t quicly_cc_pico_init = {pico_init};
6 changes: 2 additions & 4 deletions lib/cc-reno.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static void reno_on_acked(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t b

/* Slow start. */
if (cc->cwnd < cc->ssthresh) {
cc->cwnd += bytes;
cc->cwnd += bytes;
if (cc->cwnd_maximum < cc->cwnd)
cc->cwnd_maximum = cc->cwnd;
return;
Expand Down Expand Up @@ -135,16 +135,14 @@ static void reno_init(quicly_init_cc_t *self, quicly_cc_t *cc, uint32_t initcwnd
reno_reset(cc, initcwnd);
}

struct st_quicly_variable_ss reno_active_slowstart = {&quicly_default_ss};

quicly_cc_type_t quicly_cc_type_reno = {"reno",
&quicly_cc_reno_init,
reno_on_acked,
quicly_cc_reno_on_lost,
quicly_cc_reno_on_persistent_congestion,
quicly_cc_reno_on_sent,
reno_on_switch,
&reno_active_slowstart,
&quicly_default_ss,
quicly_cc_jumpstart_enter};
quicly_init_cc_t quicly_cc_reno_init = {reno_init};

Expand Down
4 changes: 2 additions & 2 deletions lib/quicly.c
Original file line number Diff line number Diff line change
Expand Up @@ -2260,8 +2260,8 @@ static quicly_conn_t *create_connection(quicly_context_t *ctx, uint32_t protocol
conn->egress.ack_frequency.update_at = INT64_MAX;
conn->egress.send_ack_at = INT64_MAX;
conn->super.ctx->init_cc->cb(conn->super.ctx->init_cc, &conn->egress.cc, initcwnd, conn->stash.now);
if (conn->egress.cc.type->cc_slowstart != NULL) {
conn->egress.cc.type->cc_slowstart->slowstart = conn->super.ctx->cc_slowstart;
if (conn->super.ctx->cc_slowstart != NULL) {
conn->egress.cc.type->cc_slowstart = conn->super.ctx->cc_slowstart;
}
if (pacer != NULL) {
conn->egress.pacer = pacer;
Expand Down
63 changes: 0 additions & 63 deletions lib/ss-hybla.c

This file was deleted.

95 changes: 0 additions & 95 deletions lib/ss-hystart.c

This file was deleted.

10 changes: 8 additions & 2 deletions lib/ss-rfc2001.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (c) 2024 Viasat Inc.
* Authors: Amber Cronin, Jae Won Chung, Mike Foxworthy, Feng Li, Mark Claypool
Comment thread
parvit marked this conversation as resolved.
Outdated
*
Expand Down Expand Up @@ -40,4 +40,10 @@ void ss_quicly_default(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t byte

quicly_ss_type_t quicly_ss_type_rfc2001= { "rfc2001", ss_quicly_default };

quicly_ss_type_t* quicly_ss_all_types[] = { &quicly_ss_type_rfc2001, &quicly_ss_type_hybla, &quicly_ss_type_hystart, &quicly_ss_type_search, NULL };
void ss_quicly_none(quicly_cc_t *cc, const quicly_loss_t *loss, uint32_t bytes, uint64_t largest_acked, uint32_t inflight,
uint64_t next_pn, int64_t now, uint32_t max_udp_payload_size)
{}

quicly_ss_type_t quicly_ss_type_none = { "none", ss_quicly_none };

quicly_ss_type_t* quicly_ss_all_types[] = { &quicly_ss_type_none, &quicly_ss_type_rfc2001, &quicly_ss_type_search, NULL };
Loading