Commit 518ec6a6 authored by Mike Perry's avatar Mike Perry
Browse files

fixup! Prop#324: Common RTT, BDP, and blocked channel signal support

Fix inflight off by one. Thanks dgoulet!
parent 3ded9615
Pipeline #10174 failed with stage
in 16 minutes and 35 seconds
......@@ -398,15 +398,8 @@ circuit_sent_cell_for_sendme(const circuit_t *circ,
if (!cc->inflight)
return false;
/* XXX: Nick suspects that this check may be off-by-one, from arti
* testing. This check is the same as the one for determining the digest
* of the auth-sendme cell. If it is wrong, fixing it here is easy. Fixing
* auth-sendme requires a protover bump, of course :/.
* The consequences for congestion control is that RTT is off slightly,
* as is BDP estimates... Fixing this for congestion control does not
* require a version bump, but we should still investigate it.
/* This check must be +1 because this function is called *before*
* inflight is incremented for the sent cell */
if ((cc->inflight+1) % cc->sendme_inc != 0)
return false;
......@@ -449,15 +442,18 @@ congestion_control_note_cell_sent(congestion_control_t *cc,
/* Is this the last cell before a SENDME? The idea is that if the
* package_window reaches a multiple of the increment, after this cell, we
* should expect a SENDME. */
* should expect a SENDME. Note that this function must be called *before*
* we account for the sent cell. */
if (!circuit_sent_cell_for_sendme(circ, cpath)) {
/* Record this cell time for RTT computation when SENDME arrives */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment