User Tools

Site Tools


public:send_acknowledgment

When to send an acknowledgment?

From quic-transport-24 draft, section 13.2.

Endpoints acknowledge all packets they receive and process. However,
only ack-eliciting packets cause an ACK frame to be sent within the
maximum ack delay. Packets that are not ack-eliciting are only
acknowledged when an ACK frame is sent for other reasons.

When sending a packet for any reason, an endpoint should attempt to
bundle an ACK frame if one has not been sent recently.

and further from section 13.2.1.

Every packet SHOULD be acknowledged at least once, and ack-eliciting
packets MUST be acknowledged at least once within the maximum ack
delay.

An ACK frame SHOULD be generated for at least every second ack-
eliciting packet.

An endpoint that is only sending ACK frames will not receive
acknowledgments from its peer unless *those acknowledgements* are
included in packets with ack-eliciting frames. An endpoint SHOULD
bundle ACK frames with other frames when there are new ack-eliciting
packets to acknowledge. When only non-ack-eliciting packets need to
be acknowledged, an endpoint MAY wait until an ack-eliciting packet
has been received to bundle an ACK frame with outgoing frames.

This leads to the following implementation.

on ack-eliciting packet received → start ack delay timer and notice that we could send an ack. * when sending a packet → include this ack and cancel ack delay timer. * on second ack-eliciting packet received → send ack immediately and cancel ack delay timer. * on ack delay timeout → send ack immediately.

on non-ack-eliciting packet → ? - Let the parameter quic.bundleAckForNonAckElicitingPackets decide.

on non-ack-eliciting packet while bundleAckForNonAckElicitingPackets=true → notice that we could send an ack, but do not start ack delay timer.

* When sending a packet, include this ack.

on non-ack-eliciting packet while bundleAckForNonAckElicitingPackets=false → do nothing

public/send_acknowledgment.txt · Last modified: by msvoelker