From: Amaury Denoyelle Date: Thu, 13 Oct 2022 08:11:36 +0000 (+0200) Subject: CLEANUP: quic: remove unused rxbufs member in receiver X-Git-Tag: v2.7-dev8~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c4d062d25f57ec983ea8e71a3ccc2f1f9ba7b00;p=thirdparty%2Fhaproxy.git CLEANUP: quic: remove unused rxbufs member in receiver rxbuf is the structure used to store QUIC datagrams and redispatch them to the connection thread. Each receiver manages a list of rxbuf. This was stored both as an array and a mt_list. Currently, only mt_list is needed so removed member from receiver structure. This should be backported up to 2.6. --- diff --git a/include/haproxy/receiver-t.h b/include/haproxy/receiver-t.h index 5b16770aff..407c7be72e 100644 --- a/include/haproxy/receiver-t.h +++ b/include/haproxy/receiver-t.h @@ -65,7 +65,6 @@ struct receiver { struct rx_settings *settings; /* points to the settings used by this receiver */ struct list proto_list; /* list in the protocol header */ #ifdef USE_QUIC - struct rxbuf **rxbufs; /* Array of buffers for RX (one by thread) */ struct mt_list rxbuf_list; /* The same as ->rxbufs but arranged in a list */ #endif /* warning: this struct is huge, keep it at the bottom */ diff --git a/src/proto_quic.c b/src/proto_quic.c index cf1e0ded10..63d635d94b 100644 --- a/src/proto_quic.c +++ b/src/proto_quic.c @@ -540,10 +540,6 @@ static int quic_alloc_rxbufs_listener(struct listener *l) int i; struct rxbuf *rxbuf; - l->rx.rxbufs = calloc(global.nbthread, sizeof *l->rx.rxbufs); - if (!l->rx.rxbufs) - return 0; - MT_LIST_INIT(&l->rx.rxbuf_list); for (i = 0; i < global.nbthread; i++) { char *buf; @@ -559,8 +555,6 @@ static int quic_alloc_rxbufs_listener(struct listener *l) goto err; } - l->rx.rxbufs[i] = rxbuf; - rxbuf->buf = b_make(buf, QUIC_RX_BUFSZ, 0, 0); LIST_INIT(&rxbuf->dgrams); MT_LIST_APPEND(&l->rx.rxbuf_list, &rxbuf->mt_list); @@ -573,7 +567,6 @@ static int quic_alloc_rxbufs_listener(struct listener *l) pool_free(pool_head_quic_rxbuf, rxbuf->buf.area); free(rxbuf); } - free(l->rx.rxbufs); return 0; }