MINOR: quic: Add ring buffer definition (struct qring) for QUIC

A ring buffer is made of a circular buffer (->cbuf) and must be arrange
in a MT_LIST (->mt_list).
This commit is contained in:
Frédéric Lécaille 2021-07-06 15:34:37 +02:00 committed by Amaury Denoyelle
parent 9621565b74
commit 22cfdf8d0e

View 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