]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic: quic_conn struct cleanup
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 25 Jul 2023 14:49:30 +0000 (16:49 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 27 Jul 2023 08:51:03 +0000 (10:51 +0200)
Remove no more used QUIC_TX_RING_BUFSZ macro.
Remove several no more used quic_conn struct members.

include/haproxy/quic_conn-t.h
src/quic_conn.c

index c6a0744ab519c739e4a89ff7464dce5965e8c3ac..ae104489bf17f882c2edc227a0a598a33fa68555 100644 (file)
@@ -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 */
index 9e7dd466f16314cf69f81e935cf1081699ad321d..40dcdee158830cf4e1f9b637b249f00ef6fd2e08 100644 (file)
@@ -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;