]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Add ring buffer definition (struct qring) for QUIC
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 6 Jul 2021 13:34:37 +0000 (15:34 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Sep 2021 13:27:25 +0000 (15:27 +0200)
A ring buffer is made of a circular buffer (->cbuf) and must be arrange
in a MT_LIST (->mt_list).

include/haproxy/xprt_quic-t.h

index da09d5a69a2764ca6a597d74d106817782209250..0e5671ed9051ab6b9ffb4d6e37df086070135ef8 100644 (file)
@@ -29,6 +29,7 @@
 #include <sys/socket.h>
 #include <openssl/ssl.h>
 
+#include <haproxy/cbuf-t.h>
 #include <haproxy/list.h>
 
 #include <haproxy/quic_cc-t.h>
@@ -574,6 +575,12 @@ struct quic_path {
        uint64_t ifae_pkts;
 };
 
+/* QUIC ring buffer */
+struct qring {
+       struct cbuf *cbuf;
+       struct mt_list mt_list;
+};
+
 /* The number of buffers for outgoing packets (must be a power of two). */
 #define QUIC_CONN_TX_BUFS_NB 8
 #define QUIC_CONN_TX_BUF_SZ  QUIC_PACKET_MAXLEN