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

Add OnPacketSentCC #780

Merged
merged 4 commits into from
Sep 19, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions draft-ietf-quic-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,12 @@ are as follows:

* packet_number: The packet number of the sent packet.

* is_ack_only: A boolean that indicates whether a packet only contains an
* is_ack_only: A boolean that indicates whether a packet only contains an
ACK frame. If true, it is still expected an ack will be received for
this packet, but it is not congestion controlled.

* sent_bytes: The number of bytes sent in the packet.
* sent_bytes: The number of bytes sent in the packet, not including UDP or IP
overhead, but including QUIC framing overhead.

Pseudocode for OnPacketSent follows:

Expand Down Expand Up @@ -635,7 +636,7 @@ the smoothed rtt. Specifically, the pacing rate is 2 times the
congestion window divided by the smoothed RTT during slow start
and 1.25 times the congestion window divided by the smoothed RTT during
slow start. In order to fairly compete with flows that are not pacing,
it is recommended to not pace the first 10 packets sent when exiting
it is recommended to not pace the first 10 sent packets when exiting
quiescence.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this entire section should be removed and left to implementers. But this is fine for now, let's discuss that separately.


## Pseudocode
Expand Down Expand Up @@ -713,11 +714,16 @@ acked_packet from sent_packets.

~~~
OnPacketAckedCC(acked_packet):
// Remove from bytes_in_flight.
bytes_in_flight -= acked_packet.bytes
if (acked_packet.packet_number < end_of_recovery):
// Do not increase congestion window in recovery period.
return
if (congestion_window < ssthresh):
// Slow start.
congestion_window += acked_packets.bytes
else:
// Congestion avoidance.
congestion_window +=
acked_packets.bytes / congestion_window
~~~
Expand Down