Skip to content

circuit: Reactor considers all cell to be under congestion control

This was also the case before congestion control that is with fixed window.

The check for .can_send() or (window == 0) is done without inspecting the message on the stream. This is not desirable as for now only RELAY DATA cell should be considered for congestion control.

Things are actually much more chaotic in that reactor. Because of the control channel, we can get requests that send cells bypassing congestion control. Fortunately, as far as I can tell, it seems all cell on the control channel are never a data cell.

Except that CtrlMsg::SendMsg is a possible command and it is for any type of message so essentially, there is a way to bypass congestion control at the moment. We should either specialize that call to a specific message(s) or somehow pass it to the outbound cell handling of the reactor so congestion control can be a thing.

We should probably go a step further and make all relay cell type go through the same "outbound cell handling" process and let congestion control decides. This will be instrumental for allowing more cells to be under CC.

Finally, I do wonder if also we could restrict the stream Receiver to be on data message only. Again, as far as I can tell, all non-data cell comes from the control channel. Maybe this isn't true?