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.
This commit is contained in:
parent
e1a49cfd4d
commit
8c4d062d25
@ -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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user