Skip to content
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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

vkrasnov
Copy link
Contributor

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.

@vkrasnov vkrasnov requested a review from a team as a code owner March 12, 2024 18:25
qlog/src/events/quic.rs Outdated Show resolved Hide resolved
@vkrasnov vkrasnov force-pushed the vlad/gcongestion_split branch 3 times, most recently from 2ca0301 to 6575ed1 Compare March 14, 2024 13:43
@LPardue
Copy link
Contributor

LPardue commented Apr 5, 2024

needs a rebase


trace!("{} packet newly acked {}", trace_id, unacked.pkt_num);
Copy link
Contributor

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/mod.rs Outdated Show resolved Hide resolved
Comment on lines 42 to 43
&mut self, latest_rtt: Duration, mut ack_delay: Duration, now: Instant,
handshake_confirmed: bool,
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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>,
Copy link
Contributor

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?

quiche/src/recovery/mod.rs Outdated Show resolved Hide resolved
}

#[cfg(test)]
pub(crate) mod test_sender {
Copy link
Contributor

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

Copy link
Contributor Author

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,
Copy link
Member

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

Copy link
Contributor Author

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

} else {
Duration::from_micros(0)
};
let ack_delay = Duration::from_micros(ack_delay);
Copy link
Contributor

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

@vkrasnov
Copy link
Contributor Author

needs a rebase

rebased, and fixed a few issues in the process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants