From 71f3abbb5269caf85da9a87f21b2c8e9302a9b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 15 Feb 2022 16:59:48 +0100 Subject: [PATCH] MINOR: quic: Move quic_rxbuf_pool pool out of xprt part This pool could be confuse with that of the RX buffer pool for the connection (quic_conn_rxbuf). --- include/haproxy/xprt_quic-t.h | 1 - src/proto_quic.c | 5 +++++ src/xprt_quic.c | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h index 66912ef48..ace547634 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -248,7 +248,6 @@ enum quic_pkt_type { extern struct trace_source trace_quic; extern struct pool_head *pool_head_quic_tx_ring; -extern struct pool_head *pool_head_quic_rxbuf; extern struct pool_head *pool_head_quic_rx_packet; extern struct pool_head *pool_head_quic_tx_packet; extern struct pool_head *pool_head_quic_frame; diff --git a/src/proto_quic.c b/src/proto_quic.c index e3ea5094f..a0b4147f5 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -50,6 +50,11 @@ /* per-thread quic datagram handlers */ struct quic_dghdlr *quic_dghdlrs; +/* Size of the internal buffer of QUIC RX buffer at the fd level */ +#define QUIC_RX_BUFSZ (1UL << 18) + +DECLARE_STATIC_POOL(pool_head_quic_rxbuf, "quic_rxbuf_pool", QUIC_RX_BUFSZ); + static void quic_add_listener(struct protocol *proto, struct listener *listener); static int quic_bind_listener(struct listener *listener, char *errmsg, int errlen); static int quic_connect_server(struct connection *conn, int flags); diff --git a/src/xprt_quic.c b/src/xprt_quic.c index a50666727..0048f7b13 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -154,7 +154,6 @@ INITCALL1(STG_REGISTER, trace_register_source, TRACE_SOURCE); static BIO_METHOD *ha_quic_meth; DECLARE_POOL(pool_head_quic_tx_ring, "quic_tx_ring_pool", QUIC_TX_RING_BUFSZ); -DECLARE_POOL(pool_head_quic_rxbuf, "quic_rxbuf_pool", QUIC_RX_BUFSZ); DECLARE_POOL(pool_head_quic_conn_rxbuf, "quic_conn_rxbuf", QUIC_CONN_RX_BUFSZ); DECLARE_STATIC_POOL(pool_head_quic_conn_ctx, "quic_conn_ctx_pool", sizeof(struct ssl_sock_ctx));