From e445b1ab036ae923f1623355fbe31366512a6715 Mon Sep 17 00:00:00 2001 From: Frederic Lecaille Date: Thu, 29 Oct 2026 14:14:16 +0100 Subject: [PATCH] CLEANUP: quic: remove the unused tx part of struct quic_cstream struct quic_cstream carries a tx substructure with offset, sent_offset and buf members, inherited from the qcs object it was derived from to handle CRYPTO streams. Nothing ever reads them: the TX side of the CRYPTO stream is handled by the tx crypto buffers of its encryption level for the data, and by the stream descriptor attached to the cstream. Only quic_cstream_new() sets the three members and no reader exists anywhere in src/ or include/. They were already unread when they were introduced (commit 7e3f7c47e "MINOR: quic: New quic_cstream object implementation"), so let's remove them along with their initialization. --- include/haproxy/quic_tls-t.h | 6 ------ src/quic_tls.c | 4 ---- 2 files changed, 10 deletions(-) diff --git a/include/haproxy/quic_tls-t.h b/include/haproxy/quic_tls-t.h index 6bcc75b1d..e42655330 100644 --- a/include/haproxy/quic_tls-t.h +++ b/include/haproxy/quic_tls-t.h @@ -273,12 +273,6 @@ struct quic_cstream { uint64_t offset; /* absolute current base offset of ncbuf */ struct ncbmbuf ncbuf; /* receive buffer - can handle out-of-order offset frames */ } rx; - struct { - uint64_t offset; /* last offset of data ready to be sent */ - uint64_t sent_offset; /* last offset sent by transport layer */ - struct buffer buf; /* transmit buffer before sending via xprt */ - } tx; - struct qc_stream_desc *desc; }; diff --git a/src/quic_tls.c b/src/quic_tls.c index 6005ddc5b..0719b00b2 100644 --- a/src/quic_tls.c +++ b/src/quic_tls.c @@ -151,10 +151,6 @@ struct quic_cstream *quic_cstream_new(struct quic_conn *qc) cs->rx.offset = 0; cs->rx.ncbuf = NCBMBUF_NULL; - - cs->tx.offset = 0; - cs->tx.sent_offset = 0; - cs->tx.buf = BUF_NULL; cs->desc = qc_stream_desc_new((uint64_t)-1, -1, cs, qc); if (!cs->desc) { TRACE_ERROR("crypto stream allocation failed", QUIC_EV_CONN_INIT, qc); -- 2.47.3