-
Notifications
You must be signed in to change notification settings - Fork 207
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
QUIC - RTT handling code, improved packet expiry #3975
base: main
Are you sure you want to change the base?
Conversation
bf90165
to
0e1304e
Compare
fd_quic_range_t range; /* CRYPTO data range; FIXME use pkt_meta var instead */ | ||
ulong stream_id; /* if this contains stream data, | ||
the stream id, else zero */ | ||
|
||
ulong expiry; /* time pkt_meta expires... this is the time the | ||
ack is expected by */ | ||
ulong tx_time; /* transmit time */ |
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.
Does it make sense to have separate tx_time and expiry?
Can we not just have a conn-wide expiry timer that adjusts simultaneously for all outgoing packets?
(Maybe something for a future PR)
And expiry = pkt->tx_time + conn->expiry_duration
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.
That's basically what the PTO does in the spec. I'll consider adding it in this PR
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.
The new logic is complex enough that it's worth adding regression tests with simulated inputs, IMO.
(e.g. take a pcap of a real QUIC exchange over a lossy link, export the ACK delay samples to a C table, feed into the algo, assert that the derived RTT and expiry timeouts are in a reasonable range)
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.
ok
f00a583
to
132d916
Compare
In normal running the client keeps sending us streams, and we send acks. Because acks aren't "mandatory ack" we don't get an RTT from them. So also added code to periodically (once per minute) throw in a ping.
Calculates smoothed_rtt and var_rtt (rttvar) according to spec. Uses these to set expiry on packets.
Follow up could include an implementation of the PTO (Probe Time Out) algorithms from the spec.