diff options
author | David Goulet <dgoulet@torproject.org> | 2018-02-15 14:23:36 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-02-15 14:36:39 -0500 |
commit | c235c32bbcd33351d0d720fe2fb3dbac6369d12c (patch) | |
tree | 86838b32fa603d2131d1b615e7537c9c19eeafd2 /src/test/test_circuitmux.c | |
parent | 9d68647ba3fc0774653be7ac994f8a6307b146f9 (diff) | |
download | tor-c235c32bbcd33351d0d720fe2fb3dbac6369d12c.tar.gz tor-c235c32bbcd33351d0d720fe2fb3dbac6369d12c.zip |
cmux: Remove round-robin circuit policy
Since 0.2.4, tor uses EWMA circuit policy to prioritize. The previous
algorithm, round-robin, hasn't been used since then but was still used as a
fallback.
Now that EWMA is mandatory, remove that code entirely and enforce a cmux
policy to be set.
This is part of a circuitmux cleanup to improve performance and reduce
complexity in the code. We'll be able to address future optimization with this
work.
Closes #25268
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_circuitmux.c')
-rw-r--r-- | src/test/test_circuitmux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c index 854f725054..75b7a0ea47 100644 --- a/src/test/test_circuitmux.c +++ b/src/test/test_circuitmux.c @@ -7,6 +7,7 @@ #include "or.h" #include "channel.h" #include "circuitmux.h" +#include "circuitmux_ewma.h" #include "relay.h" #include "scheduler.h" #include "test.h" @@ -45,6 +46,7 @@ test_cmux_destroy_cell_queue(void *arg) cmux = circuitmux_alloc(); tt_assert(cmux); ch = new_fake_channel(); + circuitmux_set_policy(cmux, &ewma_policy); ch->has_queued_writes = has_queued_writes; ch->wide_circ_ids = 1; |