aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2023-01-20 19:14:33 +0000
committerMike Perry <mikeperry-git@torproject.org>2023-04-06 15:57:10 +0000
commit21c861bfa3188444798a35e21f26579dd910a452 (patch)
treebd09bd363fa67cee794aa1bc1a1e4268ae70155e /src/core/or/circuituse.c
parenta4ee0c29ee52052f82692f0825a50e1a55e01e5c (diff)
downloadtor-21c861bfa3188444798a35e21f26579dd910a452.tar.gz
tor-21c861bfa3188444798a35e21f26579dd910a452.zip
Refactor stream blocking due to channel cell queues
Streams can get blocked on a circuit in two ways: 1. When the circuit package window is full 2. When the channel's cell queue is too high Conflux needs to decouple stream blocking from both of these conditions, because streams can continue on another circuit, even if the primary circuit is blocked for either of these cases. However, both conflux and congestion control need to know if the channel's cell queue hit the highwatermark and is still draining, because this condition is used by those components, independent of stream state. Therefore, this commit renames the 'streams_blocked_on_chan' variable to signify that it refers to the cell queue state, and also refactors the actual stream blocking bits out, so they can be handled separately if conflux is present.
Diffstat (limited to 'src/core/or/circuituse.c')
-rw-r--r--src/core/or/circuituse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 9110252976..25401aea55 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -63,6 +63,7 @@
#include "lib/math/fp.h"
#include "lib/time/tvdiff.h"
#include "lib/trace/events.h"
+#include "src/core/mainloop/mainloop.h"
#include "core/or/cpath_build_state_st.h"
#include "feature/dircommon/dir_connection_st.h"
@@ -938,7 +939,7 @@ circuit_log_ancient_one_hop_circuits(int age)
c->marked_for_close,
c->hold_open_until_flushed ? "" : "not ",
conn->edge_has_sent_end ? "" : "not ",
- conn->edge_blocked_on_circ ? "Blocked" : "Not blocked");
+ connection_is_reading(c) ? "Not blocked" : "Blocked");
if (! c->linked_conn)
continue;