| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
We will need this to calculate the END ack timeout.
|
| |
|
|
|
|
|
|
|
|
| |
```text
warning: duplicated attribute
--> crates/tor-hsservice/src/timeout_track.rs:630:14
|
630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
| |
A `None` value signals to the conflux code to know to fall back on the
initial RTT of the circuit.
Without this change, the conflux switching logic is broken as we end up
staying on the leg with the best initial RTT forever (the other leg is
never picked, because its `ewma_rtt()` is stuck on `u32::MAX`, and never
updated as we never send on it).
|
| |
|
|
|
|
|
| |
The expanded expression makes it easier to see that
`can_crosscheck_with_current_estimate()` can never return `true` if
`self.ewma_rtt` is `None`, and that the `expect()` from
`is_clock_stalled()` cannot panic.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The `RttEstimator` now uses `None` to represent not-yet-measured RTTs.
Previously, all the measured RTTs defaulted to 0, in contradiction with
the `RttEstimator::{min,ewma}_rtt_usec()` docs, which state that both
functions are supposed to return `u32::MAX` if there is no estimate.
Closes #2049
|
| | |
|
| |
|
|
|
|
| |
Allows us to remove the pub.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
Instead of having the congestion.rs test module public, make a
test_utils.rs file that contains code for other unit tests within the
congestion module.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
Turns out that RoundTripEstimatorParams is the same exact thing so one
less data structure.
Signed-off-by: David Goulet <[email protected]>
|
|
|
This commit adds the congestion window object, a round trip estimator
(RTT) and a state enum. These 3 entities are used by congestion control
in a generic way that is they are passed and used by any algorithm.
At this commit, they are not used hence the allow deadcode attribute for
now in order to minimize the build warnings.
We also introduce the params.rs file containing the parameters, taken
from consensus, used to configure these objects. They will be exposed to
the tor-cirmgr crate to build the CircParameters. More will come.
This also introduces the congestion/ directory that will contain more
code in future commits.
Related #534
Signed-off-by: David Goulet <[email protected]>
|