]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: quic: remove the unused tx part of struct quic_cstream
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 29 Oct 2026 13:14:16 +0000 (14:14 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 3 Nov 2026 06:56:46 +0000 (07:56 +0100)
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
src/quic_tls.c

index 6bcc75b1d561fe8dcb7c43ca3146d07167ab6d70..e42655330caf12f15bcca91e2289e4630062f2b6 100644 (file)
@@ -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;
 };
 
index 6005ddc5bfe7a9fd750cdacde276410b1359dc2e..0719b00b2425a8d9f5f1ec035e7c32f08533c16c 100644 (file)
@@ -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);