]> git.kaiwu.me - haproxy.git/commit
CLEANUP: quic: fix and complete the comments in quic_retransmit.c
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 4 Nov 2026 16:30:26 +0000 (17:30 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 5 Nov 2026 08:58:36 +0000 (09:58 +0100)
commit1ce318349e8986628671ca2ca6929d2d46d25eff
tree78eb8f75547491f1bec637bc254c5606594f5c4e
parent2e8fbbf87e3f834bb5af9adb44c382ba0f29b606
CLEANUP: quic: fix and complete the comments in quic_retransmit.c

Three comments are inaccurate:

  - qc_prep_fast_retrans() is documented as taking a <qel> argument, but
    it has been replaced by <pktns> for a while;

  - the packet lookup loop of qc_prep_fast_retrans() is said to skip the
    coalesced packets, while QUIC_FL_TX_PACKET_COALESCED is not tested
    there at all. Only the Handshake lookup loop skips them;

  - qc_pkt_with_only_acked_frms() is documented as returning 1 for a
    packet made only of acknowledged frames, but it also returns 1 for a
    packet without any frame. qc_prep_fast_retrans() relies on this to
    skip the empty packets.

Three comment blocks are added where the intent is not obvious: the
<tmp> list used by qc_dup_pkt_frms() to prepend the duplicated frames
ahead of the pending ones, the <pkt> variable which is deliberately not
reset before the <start> label so that a second probe datagram is built
from the same frames when no other packet may be retransmitted, and the
Initial packet number space which may still be probed with a PING frame
when the anti-amplification limit allows to send a full-size datagram.

Only comments are touched, no need to backport.
src/quic_retransmit.c