mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-17 21:59:12 +02:00
MEDIUM: quic: Limit the number of ACK ranges
When building a packet with an ACK frame, we store the largest acknowledged packet number sent in this frame in the packet (quic_tx_packet struc). When receiving an ack for such a packet we can purge the tree of acknowledged packet number ranges from the range sent before this largest acknowledged packet number.
This commit is contained in:
committed by
Amaury Denoyelle
parent
8f3ae0272f
commit
141982a4e1
@@ -991,6 +991,17 @@ static inline void quic_pktns_init(struct quic_pktns *pktns)
|
||||
pktns->flags = 0;
|
||||
}
|
||||
|
||||
/* Returns the current largest acknowledged packet number if exists, -1 if not */
|
||||
static inline int64_t quic_pktns_get_largest_acked_pn(struct quic_pktns *pktns)
|
||||
{
|
||||
struct eb64_node *ar = eb64_last(&pktns->rx.arngs.root);
|
||||
|
||||
if (!ar)
|
||||
return -1;
|
||||
|
||||
return eb64_entry(&ar->node, struct quic_arng_node, first)->last;
|
||||
}
|
||||
|
||||
/* Discard <pktns> packet number space attached to <qc> QUIC connection.
|
||||
* Its loss information are reset. Deduce the outstanding bytes for this
|
||||
* packet number space from the outstanding bytes for the path of this
|
||||
|
||||
Reference in New Issue
Block a user