summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2022-01-22 19:22:40 +0000
committerMike Perry <mikeperry-git@torproject.org>2022-02-22 19:28:35 +0000
commit1960bf09f3e3fb234678247f1f78d806bb9066ed (patch)
tree52cda9e4e244bce77064116d910ef015c7112af2
parentd62f9c9d0058ba3bfa8fe226c697abb05a477c5a (diff)
downloadtor-1960bf09f3e3fb234678247f1f78d806bb9066ed.tar.gz
tor-1960bf09f3e3fb234678247f1f78d806bb9066ed.zip
Increment by at least 2 sendme_incs in slow start
-rw-r--r--src/core/or/congestion_control_vegas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/or/congestion_control_vegas.c b/src/core/or/congestion_control_vegas.c
index d823a5068e..0ebff17faf 100644
--- a/src/core/or/congestion_control_vegas.c
+++ b/src/core/or/congestion_control_vegas.c
@@ -206,8 +206,8 @@ congestion_control_vegas_process_sendme(congestion_control_t *cc,
if (cc->in_slow_start) {
if (queue_use < cc->vegas_params.gamma && !cc->blocked_chan) {
/* Grow to BDP immediately, then exponential growth until
- * congestion signal */
- cc->cwnd = MAX(cc->cwnd + CWND_INC_SS(cc),
+ * congestion signal. Increment by at least 2 sendme's worth. */
+ cc->cwnd = MAX(cc->cwnd + MAX(CWND_INC_SS(cc), 2*cc->sendme_inc),
vegas_bdp_mix(cc));
} else {
/* Congestion signal: Fall back to Vegas equilibrium (BDP) */