From: Frederic Lecaille Date: Thu, 29 Oct 2026 13:14:16 +0000 (+0100) Subject: CLEANUP: quic: remove the unused tx part of struct quic_cstream X-Git-Tag: v3.5-dev11~73 X-Git-Url: https://git.kaiwu.me/$%7BISSUES%7D/static/gitweb.js?a=commitdiff_plain;h=e445b1ab036ae923f1623355fbe31366512a6715;p=haproxy.git 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. --- 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);