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_channel.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_channel.c')
-rw-r--r-- | src/test/test_channel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/test_channel.c b/src/test/test_channel.c index 3927597687..812ec6c1ac 100644 --- a/src/test/test_channel.c +++ b/src/test/test_channel.c @@ -281,6 +281,7 @@ new_fake_channel(void) chan->state = CHANNEL_STATE_OPEN; chan->cmux = circuitmux_alloc(); + circuitmux_set_policy(chan->cmux, &ewma_policy); return chan; } @@ -582,8 +583,6 @@ test_channel_outbound_cell(void *arg) * to the channel's cmux as well. */ circuit_set_n_circid_chan(TO_CIRCUIT(circ), 42, chan); tt_int_op(channel_num_circuits(chan), OP_EQ, 1); - tt_assert(!TO_CIRCUIT(circ)->next_active_on_n_chan); - tt_assert(!TO_CIRCUIT(circ)->prev_active_on_n_chan); /* Test the cmux state. */ tt_ptr_op(TO_CIRCUIT(circ)->n_mux, OP_EQ, chan->cmux); tt_int_op(circuitmux_is_circuit_attached(chan->cmux, TO_CIRCUIT(circ)), |