mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-14 02:57:01 +02:00
When a STREAM frame is retransmitted, a check is performed to remove range of data already acked from it. This is useful when STREAM frames are duplicated and splitted to cover different data ranges. The newly retransmitted frame contains only unacked data. This process is performed similarly in qc_dup_pkt_frms() and qc_build_frms(). Refactor the code into a new function named qc_stream_frm_is_acked(). It returns true if frame data are already fully acked and retransmission can be avoided. If only a partial range of data is acknowledged, frame content is updated to only cover the unacked data. This patch does not have any functional change. However, it simplifies retransmission for STREAM frames. Also, it will be reused to fix retransmission for empty STREAM frames with FIN set from the following patch : BUG/MEDIUM: quic: handle retransmit for standalone FIN STREAM As such, it must be backported prior to it.
25 lines
692 B
C
25 lines
692 B
C
#ifndef _HAPROXY_QUIC_RETRANSMIT_H
|
|
#define _HAPROXY_QUIC_RETRANSMIT_H
|
|
|
|
#ifdef USE_QUIC
|
|
#ifndef USE_OPENSSL
|
|
#error "Must define USE_OPENSSL"
|
|
#endif
|
|
|
|
#include <haproxy/list-t.h>
|
|
#include <haproxy/quic_conn-t.h>
|
|
#include <haproxy/quic_tls-t.h>
|
|
|
|
struct quic_frame;
|
|
|
|
int qc_stream_frm_is_acked(struct quic_conn *qc, struct quic_frame *f);
|
|
|
|
void qc_prep_fast_retrans(struct quic_conn *qc,
|
|
struct quic_pktns *pktns,
|
|
struct list *frms1, struct list *frms2);
|
|
void qc_prep_hdshk_fast_retrans(struct quic_conn *qc,
|
|
struct list *ifrms, struct list *hfrms);
|
|
|
|
#endif /* USE_QUIC */
|
|
#endif /* _HAPROXY_QUIC_RETRANSMIT_H */
|