From: Willy Tarreau Date: Thu, 23 Jun 2022 09:02:08 +0000 (+0200) Subject: CLEANUP: pool/tree-wide: remove suffix "_pool" from certain pool names X-Git-Tag: v2.7-dev1~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8dec4a01acd18ab904c4740a9bd460134d3bf68;p=thirdparty%2Fhaproxy.git CLEANUP: pool/tree-wide: remove suffix "_pool" from certain pool names A curious practise seems to have started long ago and contaminated various code areas, consisting in appending "_pool" at the end of the name of a given pool. That makes no sense as the name is only used to name the pool in diags such as "show pools", and since names are truncated there, this adds some confusion when analysing the dump outputs. Let's just clean all of them at once. there were essentially in SSL and QUIC. --- diff --git a/src/cbuf.c b/src/cbuf.c index 46f12a3d30..b36bbebd61 100644 --- a/src/cbuf.c +++ b/src/cbuf.c @@ -22,7 +22,7 @@ #include #include -DECLARE_POOL(pool_head_cbuf, "cbuf_pool", sizeof(struct cbuf)); +DECLARE_POOL(pool_head_cbuf, "cbuf", sizeof(struct cbuf)); /* Allocate and return a new circular buffer with as byte internal buffer * if succeeded, NULL if not. diff --git a/src/proto_quic.c b/src/proto_quic.c index ab1bef18f0..2032373018 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -52,7 +52,7 @@ 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); +DECLARE_STATIC_POOL(pool_head_quic_rxbuf, "quic_rxbuf", 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); diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 01c5bc910f..e955a46cda 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -137,9 +137,9 @@ struct global_ssl global_ssl = { static BIO_METHOD *ha_meth; -DECLARE_STATIC_POOL(ssl_sock_ctx_pool, "ssl_sock_ctx_pool", sizeof(struct ssl_sock_ctx)); +DECLARE_STATIC_POOL(ssl_sock_ctx_pool, "ssl_sock_ctx", sizeof(struct ssl_sock_ctx)); -DECLARE_STATIC_POOL(ssl_sock_client_sni_pool, "ssl_sock_client_sni_pool", TLSEXT_MAXLEN_host_name + 1); +DECLARE_STATIC_POOL(ssl_sock_client_sni_pool, "ssl_sock_client_sni", TLSEXT_MAXLEN_host_name + 1); /* ssl stats module */ enum { diff --git a/src/xprt_handshake.c b/src/xprt_handshake.c index 7b2265f5ab..33f775087a 100644 --- a/src/xprt_handshake.c +++ b/src/xprt_handshake.c @@ -20,7 +20,7 @@ struct xprt_handshake_ctx { void *xprt_ctx; }; -DECLARE_STATIC_POOL(xprt_handshake_ctx_pool, "xprt_handshake_ctx_pool", sizeof(struct xprt_handshake_ctx)); +DECLARE_STATIC_POOL(xprt_handshake_ctx_pool, "xprt_handshake_ctx", sizeof(struct xprt_handshake_ctx)); /* This XPRT doesn't take care of sending or receiving data, once its handshake * is done, it just removes itself diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 20b0616ca2..f7ac1c937a 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -192,20 +192,20 @@ 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_tx_ring, "quic_tx_ring", QUIC_TX_RING_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)); + "quic_conn_ctx", sizeof(struct ssl_sock_ctx)); DECLARE_STATIC_POOL(pool_head_quic_conn, "quic_conn", sizeof(struct quic_conn)); DECLARE_POOL(pool_head_quic_connection_id, - "quic_connnection_id_pool", sizeof(struct quic_connection_id)); + "quic_connnection_id", sizeof(struct quic_connection_id)); DECLARE_POOL(pool_head_quic_dgram, "quic_dgram", sizeof(struct quic_dgram)); -DECLARE_POOL(pool_head_quic_rx_packet, "quic_rx_packet_pool", sizeof(struct quic_rx_packet)); -DECLARE_POOL(pool_head_quic_tx_packet, "quic_tx_packet_pool", sizeof(struct quic_tx_packet)); -DECLARE_STATIC_POOL(pool_head_quic_rx_crypto_frm, "quic_rx_crypto_frm_pool", sizeof(struct quic_rx_crypto_frm)); -DECLARE_STATIC_POOL(pool_head_quic_crypto_buf, "quic_crypto_buf_pool", sizeof(struct quic_crypto_buf)); -DECLARE_POOL(pool_head_quic_frame, "quic_frame_pool", sizeof(struct quic_frame)); -DECLARE_STATIC_POOL(pool_head_quic_arng, "quic_arng_pool", sizeof(struct quic_arng_node)); +DECLARE_POOL(pool_head_quic_rx_packet, "quic_rx_packet", sizeof(struct quic_rx_packet)); +DECLARE_POOL(pool_head_quic_tx_packet, "quic_tx_packet", sizeof(struct quic_tx_packet)); +DECLARE_STATIC_POOL(pool_head_quic_rx_crypto_frm, "quic_rx_crypto_frm", sizeof(struct quic_rx_crypto_frm)); +DECLARE_STATIC_POOL(pool_head_quic_crypto_buf, "quic_crypto_buf", sizeof(struct quic_crypto_buf)); +DECLARE_POOL(pool_head_quic_frame, "quic_frame", sizeof(struct quic_frame)); +DECLARE_STATIC_POOL(pool_head_quic_arng, "quic_arng", sizeof(struct quic_arng_node)); static struct quic_tx_packet *qc_build_pkt(unsigned char **pos, const unsigned char *buf_end, struct quic_enc_level *qel, struct quic_tls_ctx *ctx,