From 45fce8fcb55b3df7c7bd1d69e5a2abc7b1236272 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 13 May 2022 15:42:19 +0200 Subject: [PATCH] CLEANUP: quic: remove unused quic_rx_strm_frm quic_rx_strm_frm type was used to buffered STREAM frames received out of order. Now the MUX is able to deal directly with these frames and buffered it inside its ncbuf. --- include/haproxy/xprt_quic-t.h | 9 --------- src/xprt_quic.c | 23 ----------------------- 2 files changed, 32 deletions(-) diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h index 86cbe0e2f..c9d4b1d12 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -513,15 +513,6 @@ struct quic_rx_crypto_frm { struct quic_rx_packet *pkt; }; -/* Structure to store information about RX STREAM frames. */ -struct quic_rx_strm_frm { - struct eb64_node offset_node; - uint64_t len; - const unsigned char *data; - int fin; - struct quic_rx_packet *pkt; -}; - /* Flag a sent packet as being an ack-eliciting packet. */ #define QUIC_FL_TX_PACKET_ACK_ELICITING (1UL << 0) /* Flag a sent packet as containing a PADDING frame. */ diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 099ce67b2..bc290faea 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -167,7 +167,6 @@ DECLARE_POOL(pool_head_quic_dgram, "quic_dgram", sizeof(struct quic_dgram)); DECLARE_POOL(pool_head_quic_rx_packet, "quic_rx_packet_pool", sizeof(struct quic_rx_packet)); DECLARE_POOL(pool_head_quic_tx_packet, "quic_tx_packet_pool", sizeof(struct quic_tx_packet)); DECLARE_STATIC_POOL(pool_head_quic_rx_crypto_frm, "quic_rx_crypto_frm_pool", sizeof(struct quic_rx_crypto_frm)); -DECLARE_POOL(pool_head_quic_rx_strm_frm, "quic_rx_strm_frm", sizeof(struct quic_rx_strm_frm)); DECLARE_STATIC_POOL(pool_head_quic_crypto_buf, "quic_crypto_buf_pool", sizeof(struct quic_crypto_buf)); DECLARE_POOL(pool_head_quic_frame, "quic_frame_pool", sizeof(struct quic_frame)); DECLARE_STATIC_POOL(pool_head_quic_arng, "quic_arng_pool", sizeof(struct quic_arng_node)); @@ -2149,28 +2148,6 @@ static inline int qc_provide_cdata(struct quic_enc_level *el, return 0; } -/* Allocate a new STREAM RX frame from STREAM frame attached to - * RX packet. - * Return it if succeeded, NULL if not. - */ -static inline -struct quic_rx_strm_frm *new_quic_rx_strm_frm(struct quic_stream *stream_frm, - struct quic_rx_packet *pkt) -{ - struct quic_rx_strm_frm *frm; - - frm = pool_alloc(pool_head_quic_rx_strm_frm); - if (frm) { - frm->offset_node.key = stream_frm->offset.key; - frm->len = stream_frm->len; - frm->data = stream_frm->data; - frm->pkt = pkt; - frm->fin = stream_frm->fin; - } - - return frm; -} - /* Handle bidirectional STREAM frame. Depending on its ID, several * streams may be open. The data are copied to the stream RX buffer if possible. * If not, the STREAM frame is stored to be treated again later.