-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement recovery and congestion control #1742
base: master
Are you sure you want to change the base?
Conversation
2ca0301
to
6575ed1
Compare
needs a rebase |
|
||
trace!("{} packet newly acked {}", trace_id, unacked.pkt_num); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sad to lose trace logging
quiche/src/recovery/rtt.rs
Outdated
&mut self, latest_rtt: Duration, mut ack_delay: Duration, now: Instant, | ||
handshake_confirmed: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making the ack_delay mutable and changing it based on handshake status seems to be a functional change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just does what the RFC says, and adjusts for max_ack_delay
only after handshake is complete, and not unconditionally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we believe there is a functional bug in the current implementation, then tracking and fixing that independent of refactor is a lot clearer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you if you think it is a bug or not
pub(super) min_rtt: Minmax<Duration>, | ||
pub(super) smoothed_rtt: Duration, | ||
pub(super) rttvar: Duration, | ||
pub(super) first_rtt_sample: Option<Instant>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT the value of first_rtt_samle is never used anywhere, so maybe just needs to be a bool?
} | ||
|
||
#[cfg(test)] | ||
pub(crate) mod test_sender { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this in the Reno CC module seems a bit weird when it's used by other of CC modules for tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but then again all other modules use Reno at this point
@@ -1286,6 +1285,9 @@ pub struct Connection { | |||
/// Packet number spaces. | |||
pkt_num_spaces: [packet::PktNumSpace; packet::Epoch::count()], | |||
|
|||
/// Next packet number | |||
next_pkt_num: u64, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this merges the packet numbers from all packet number spaces into the same sequence, which is a significant functional changes, see https://datatracker.ietf.org/doc/html/rfc9000#section-12.3-8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't call it a functional change, the RFC from what I can tell does not forbid merging the packet numbers, as long as they are not reused, and it simplifies the CC packet number accounting, as it no longer needs to take epoch into concideration
quiche/src/recovery/mod.rs
Outdated
} else { | ||
Duration::from_micros(0) | ||
}; | ||
let ack_delay = Duration::from_micros(ack_delay); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems like a functional change since it will affect how update_rtt
works, albeit related to a79dbfa#r1555902791
Simplify the code by performing CC ops across epochs.
This creates a clearer separation between congestion and recovery.
rebased, and fixed a few issues in the process |
444da98
to
e452b00
Compare
e452b00
to
b4d82b0
Compare
…ion control implementations
b4d82b0
to
df50522
Compare
This change replaces the CC and pacing algorithms using the C++ google/quiche implementations rewritten in Rust.
In addition it improves on the general recovery as well.
This is essentially the same as #1490 only split into more incremental commits for easier review.