1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-07-30 14:43:05 +03:00

Schedule an ack immediately when a packet marked with ECN CE is received

Summary:
Timely reaction to congestion requires relaying any CE marks to the sender as soon as possible.

This change schedules an ack to be sent whenever incoming packets are received with CE marks. This will only happen when the readEcnOnIngress option is enabled.

Reviewed By: mjoras

Differential Revision: D58423959

fbshipit-source-id: 30f8cf8b11d0446985c2d87d7df67c24c0d5afdf
This commit is contained in:
Joseph Beshay
2024-06-12 12:08:04 -07:00
committed by Facebook GitHub Bot
parent cd4268b8f8
commit 93d38a9d8d
4 changed files with 17 additions and 1 deletions

View File

@ -2063,4 +2063,16 @@ void maybeAddPacketMark(
}
}
void maybeScheduleAckForCongestionFeedback(
const ReceivedUdpPacket& receivedPacket,
AckState& ackState) {
// If the packet was marked as having encountered congestion, send an ACK
// immediately to ensure timely response from the peer.
// Note that the tosValue will be populated only if the enableEcnOnEgress
// transport setting is enabled.
if ((receivedPacket.tosValue & 0b11) == 0b11) {
ackState.needsToSendAckImmediately = true;
}
}
} // namespace quic