diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2021-09-28 21:19:27 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-10-04 10:45:46 -0400 |
commit | 6dae9903b1d5fe3c5df712eb99076a9adf9d5c8b (patch) | |
tree | 482f37bd6bfed74d73bdffd393096ff4e38d7030 /src/core/or/channeltls.c | |
parent | 98be8634faf4405edc5388c64d9f834b6ae5b4b1 (diff) | |
download | tor-6dae9903b1d5fe3c5df712eb99076a9adf9d5c8b.tar.gz tor-6dae9903b1d5fe3c5df712eb99076a9adf9d5c8b.zip |
Turn orconn watermarks into consensus parameters.
Tuning these may reduce memory usage and latency.
Diffstat (limited to 'src/core/or/channeltls.c')
-rw-r--r-- | src/core/or/channeltls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index 481dafef91..9db8e2392d 100644 --- a/src/core/or/channeltls.c +++ b/src/core/or/channeltls.c @@ -64,6 +64,7 @@ #include "trunnel/netinfo.h" #include "core/or/channelpadding.h" #include "core/or/extendinfo.h" +#include "core/or/congestion_control_common.h" #include "core/or/cell_st.h" #include "core/or/cell_queue_st.h" @@ -793,7 +794,7 @@ channel_tls_num_cells_writeable_method(channel_t *chan) cell_network_size = get_cell_network_size(tlschan->conn->wide_circ_ids); outbuf_len = connection_get_outbuf_len(TO_CONN(tlschan->conn)); /* Get the number of cells */ - n = CEIL_DIV(OR_CONN_HIGHWATER - outbuf_len, cell_network_size); + n = CEIL_DIV(or_conn_highwatermark() - outbuf_len, cell_network_size); if (n < 0) n = 0; #if SIZEOF_SIZE_T > SIZEOF_INT if (n > INT_MAX) n = INT_MAX; |