From fa58f677871c74cd52b0afffcb611b55996f4df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 25 Jul 2023 16:49:30 +0200 Subject: [PATCH] CLEANUP: quic: quic_conn struct cleanup Remove no more used QUIC_TX_RING_BUFSZ macro. Remove several no more used quic_conn struct members. --- include/haproxy/quic_conn-t.h | 20 -------------------- src/quic_conn.c | 3 --- 2 files changed, 23 deletions(-) diff --git a/include/haproxy/quic_conn-t.h b/include/haproxy/quic_conn-t.h index c6a0744ab..ae104489b 100644 --- a/include/haproxy/quic_conn-t.h +++ b/include/haproxy/quic_conn-t.h @@ -248,8 +248,6 @@ enum quic_pkt_type { (void) (&_a == &_b); \ _a > _b ? _a : _b; }) -/* Size of the internal buffer of QUIC TX ring buffers (must be a power of 2) */ -#define QUIC_TX_RING_BUFSZ (1UL << 12) /* Size of the QUIC RX buffer for the connections */ #define QUIC_CONN_RX_BUFSZ (1UL << 16) @@ -405,12 +403,6 @@ struct quic_path { uint64_t ifae_pkts; }; -/* QUIC ring buffer */ -struct qring { - struct cbuf *cbuf; - struct mt_list mt_list; -}; - /* Status of the connection/mux layer. This defines how to handle app data. * * During a standard quic_conn lifetime it transitions like this : @@ -440,9 +432,6 @@ struct quic_conn_cntrs { long long streams_blocked_uni; /* total number of times STREAMS_BLOCKED_UNI frame was received */ }; -/* The number of buffers for outgoing packets (must be a power of two). */ -#define QUIC_CONN_TX_BUFS_NB 8 - /* Flags at connection level */ #define QUIC_FL_CONN_ANTI_AMPLIFICATION_REACHED (1U << 0) #define QUIC_FL_CONN_SPIN_BIT (1U << 1) /* Spin bit set by remote peer */ @@ -523,15 +512,6 @@ struct quic_conn { struct connection *conn; struct { - /* The remaining frames to send. */ - struct list frms_to_send; - - /* The size of the previous array. */ - size_t nb_buf; - /* Writer index. */ - int wbuf; - /* Reader index. */ - int rbuf; /* Number of sent bytes. */ uint64_t bytes; /* Number of bytes for prepared packets */ diff --git a/src/quic_conn.c b/src/quic_conn.c index 9e7dd466f..40dcdee15 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -1132,9 +1132,6 @@ struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4, TLS_EXTENSION_QUIC_TRANSPORT_PARAMETERS_DRAFT: TLS_EXTENSION_QUIC_TRANSPORT_PARAMETERS; /* TX part. */ - LIST_INIT(&qc->tx.frms_to_send); - qc->tx.nb_buf = QUIC_CONN_TX_BUFS_NB; - qc->tx.wbuf = qc->tx.rbuf = 0; qc->tx.bytes = qc->tx.prep_bytes = 0; memset(&qc->tx.params, 0, sizeof(qc->tx.params)); qc->tx.buf = BUF_NULL;