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 <rxbufs>
member from receiver structure.

This should be backported up to 2.6.

(cherry picked from commit 8c4d062d25)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
This commit is contained in:
Amaury Denoyelle 2022-10-13 10:11:36 +02:00 committed by Christopher Faulet
parent 118e94d0c0
commit 94cf0e576d
2 changed files with 0 additions and 8 deletions

View File

@ -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 */

View File

@ -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;
}