aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-proto/src/congestion/vegas.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-proto: fix cc vegas counter updates on clock stallSteven Engler2026-07-301-6/+7
| | | | | | | | | | | | | | | | | | The pseudocode says: ```text if next_cc_event: next_cc_event-- if next_cwnd_event: next_cwnd_event-- if clock_stalled_or_jumped: inflight -= 'cc_sendme_inc' return ``` but we were previously decrementing these after the return rather than before.
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | 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.
* tor-proto: vegas: return early if clock stall was detectedSteven Engler2026-05-071-4/+13
|
* tor-proto: Port to web-time-compatNick Mathewson2026-03-261-5/+3
|
* proto: Use is_multiple_of() as suggested by clippyGabriela Moldovan2026-02-161-1/+1
|
* proto: Make CongestionWindow CopyGabriela Moldovan2025-11-171-3/+3
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* clippy: fix `clippy::duplicated_attributes` warningsSteven Engler2025-08-111-1/+0
| | | | | | | | | | ```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 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* tor-proto: add `CongestionControl::uses_xon_xoff()`Steven Engler2025-07-161-0/+5
|
* proto: Make RttEstimator::{ewma,min}_rtt_usec() return `Option`.Gabriela Moldovan2025-06-271-4/+6
| | | | | | | | | | 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).
* tor-proto: Add an accessor for the cc algorithm.Gabriela Moldovan2025-06-111-2/+7
| | | | | | Conflux is only supported when prop324 congestion control is enabled, so we need an accessor for the cc algorithm of a given circuit hop in order for the conflux code to be able to check *which* cc algorithm is in use.
* tor-proto: Remove no-longer needed clone()s.Gabriela Moldovan2025-06-111-3/+3
| | | | | | This doesn't really change anything, but removing the `.clone()` makes it a bit more obvious that copying the `*Params` is a lightweight operation.
* tor-proto: Add congestion control accessors for conflux.Gabriela Moldovan2025-05-061-0/+5
|
* tor-proto: rename `allow_stream_sendme` to `uses_stream_sendme`Steven Engler2025-04-231-1/+1
| | | | | We use this method to decide whether to allow receiving stream SENDMEs, and also whether we should send stream SENDMEs.
* circ: Don't send stream level SENDME with CCDavid Goulet2025-04-231-0/+4
| | | | | | | | | | | | | This adds a new function to the CongestionControl object that returns true or false on if stream level SENDMEs are allowed by the underlying algorithm. Congestion control Vegas doesn't allow them as in it retires them and so we avoid sending them for that algorithm. Part of #1817 Signed-off-by: David Goulet <[email protected]>
* fix: fix typosDimitris Apostolou2025-01-301-2/+2
|
* congestion: Use getters for all parametersDavid Goulet2025-01-161-12/+16
| | | | | | Allows us to remove the pub. Signed-off-by: David Goulet <[email protected]>
* congestion: Move test code in test module for VegasDavid Goulet2025-01-161-16/+15
| | | | Signed-off-by: David Goulet <[email protected]>
* congestion: Add standard clippy checks to testsDavid Goulet2025-01-161-0/+14
| | | | Signed-off-by: David Goulet <[email protected]>
* congestion: Make a test_utils.rsDavid Goulet2025-01-161-1/+1
| | | | | | | | 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]>
* proto: Add Vegas congestion control algorithmDavid Goulet2025-01-161-0/+532
The big one! This is the Vegas algorithm implementation that is hooked to the CongestionControl object by implementing the algorithm trait. Still, at this commit, nothing is being used by the circuit reactor yet. Related #534 Signed-off-by: David Goulet <[email protected]>