mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: quic: Do not retransmit frames from coalesced packets
Add QUIC_FL_TX_PACKET_COALESCED flag to mark a TX packet as coalesced with others to build a datagram. Ensure we do not directly retransmit frames from such coalesced packets. They must be retransmitted from their packet number spaces to avoid duplications.
This commit is contained in:
parent
b917191817
commit
b44cbc68a6
@ -518,6 +518,8 @@ struct quic_rx_strm_frm {
|
||||
#define QUIC_FL_TX_PACKET_CC (1UL << 2)
|
||||
/* Flag a sent packet as containg an ACK frame */
|
||||
#define QUIC_FL_TX_PACKET_ACK (1UL << 3)
|
||||
/* Flag a sent packet as being coalesced to another one in the same datagram */
|
||||
#define QUIC_FL_TX_PACKET_COALESCED (1UL << 4)
|
||||
|
||||
/* Structure to store enough information about TX QUIC packets. */
|
||||
struct quic_tx_packet {
|
||||
|
@ -2339,7 +2339,7 @@ static void qc_prep_fast_retrans(struct quic_enc_level *qel,
|
||||
/* Skip the empty packet (they have already been retransmitted) */
|
||||
while (node) {
|
||||
pkt = eb64_entry(&node->node, struct quic_tx_packet, pn_node);
|
||||
if (!LIST_ISEMPTY(&pkt->frms))
|
||||
if (!LIST_ISEMPTY(&pkt->frms) && !(pkt->flags & QUIC_FL_TX_PACKET_COALESCED))
|
||||
break;
|
||||
node = eb64_next(node);
|
||||
}
|
||||
@ -2395,7 +2395,7 @@ static void qc_prep_hdshk_fast_retrans(struct quic_conn *qc)
|
||||
/* Skip the empty packet (they have already been retransmitted) */
|
||||
while (node) {
|
||||
pkt = eb64_entry(&node->node, struct quic_tx_packet, pn_node);
|
||||
if (!LIST_ISEMPTY(&pkt->frms))
|
||||
if (!LIST_ISEMPTY(&pkt->frms) && !(pkt->flags & QUIC_FL_TX_PACKET_COALESCED))
|
||||
break;
|
||||
node = eb64_next(node);
|
||||
}
|
||||
@ -2961,8 +2961,10 @@ static int qc_prep_pkts(struct quic_conn *qc, struct qring *qr,
|
||||
if (!first_pkt)
|
||||
first_pkt = cur_pkt;
|
||||
/* Attach the current one to the previous one */
|
||||
if (prv_pkt)
|
||||
if (prv_pkt) {
|
||||
prv_pkt->next = cur_pkt;
|
||||
cur_pkt->flags |= QUIC_FL_TX_PACKET_COALESCED;
|
||||
}
|
||||
/* Let's say we have to build a new dgram */
|
||||
prv_pkt = NULL;
|
||||
dglen += cur_pkt->len;
|
||||
|
Loading…
x
Reference in New Issue
Block a user