]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Mark packets as probing with old data
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 25 Apr 2022 08:24:12 +0000 (10:24 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 Apr 2022 14:22:40 +0000 (16:22 +0200)
When probing retranmissions with old data are needed for the connection we
mark the packets as probing with old data to track them when acknowledged:
we do not resend frames with old data when lost.

src/xprt_quic.c

index d688f20b3ed80c921228e3926d0837dacf283d1b..b43e65edfb9138a651bbb72aa10f2a32e6679092 100644 (file)
@@ -3012,6 +3012,9 @@ static int qc_prep_app_pkts(struct quic_conn *qc, struct qring *qr,
                if (!pkt)
                        goto err;
 
+               if (qc->flags & QUIC_FL_CONN_RETRANS_OLD_DATA)
+                       pkt->flags |= QUIC_FL_TX_PACKET_PROBE_WITH_OLD_DATA;
+
                total += pkt->len;
                /* Set the current datagram as prepared into <cbuf>. */
                qc_set_dg(cbuf, pkt->len, pkt);
@@ -3133,6 +3136,9 @@ static int qc_prep_pkts(struct quic_conn *qc, struct qring *qr,
                if (!cur_pkt)
                        goto err;
 
+               if (qc->flags & QUIC_FL_CONN_RETRANS_OLD_DATA)
+                       cur_pkt->flags |= QUIC_FL_TX_PACKET_PROBE_WITH_OLD_DATA;
+
                total += cur_pkt->len;
                /* keep trace of the first packet in the datagram */
                if (!first_pkt)