From: Frédéric Lécaille Date: Mon, 24 Apr 2023 10:05:46 +0000 (+0200) Subject: CLEANUP: quic: Remove useless parameters passes to qc_purge_tx_buf() X-Git-Tag: v2.8-dev9~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e66d67a1aeec4f996c2eaeecf6fa3bb636c71763;p=thirdparty%2Fhaproxy.git CLEANUP: quic: Remove useless parameters passes to qc_purge_tx_buf() Remove the pointer to the connection passed as parameters to qc_purge_tx_buf() and other similar function which came with qc_purge_tx_buf() implementation. They were there do track the connection during tests. Must be backported to 2.7. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index 6f885ba0fb..d89dae1395 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -3744,7 +3744,7 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf, /* Free all frames in list. In addition also remove all these frames * from the original ones if they are the results of duplications. */ -static inline void qc_free_frm_list(struct list *l, struct quic_conn *qc) +static inline void qc_free_frm_list(struct list *l) { struct quic_frame *frm, *frmbak; @@ -3755,19 +3755,19 @@ static inline void qc_free_frm_list(struct list *l, struct quic_conn *qc) } /* Free TX packet and all the packets coalesced to it. */ -static inline void qc_free_tx_coalesced_pkts(struct quic_conn *qc, struct quic_tx_packet *p) +static inline void qc_free_tx_coalesced_pkts(struct quic_tx_packet *p) { struct quic_tx_packet *pkt, *nxt_pkt; for (pkt = p; pkt; pkt = nxt_pkt) { - qc_free_frm_list(&pkt->frms, qc); + qc_free_frm_list(&pkt->frms); nxt_pkt = pkt->next; pool_free(pool_head_quic_tx_packet, pkt); } } /* Purge TX buffer from its prepare packets. */ -static void qc_purge_tx_buf(struct quic_conn *qc, struct buffer *buf) +static void qc_purge_tx_buf(struct buffer *buf) { while (b_contig_data(buf, 0)) { uint16_t dglen; @@ -3776,7 +3776,7 @@ static void qc_purge_tx_buf(struct quic_conn *qc, struct buffer *buf) dglen = read_u16(b_head(buf)); pkt = read_ptr(b_head(buf) + sizeof dglen); - qc_free_tx_coalesced_pkts(qc, pkt); + qc_free_tx_coalesced_pkts(pkt); b_del(buf, dglen + headlen); } @@ -3836,9 +3836,9 @@ int qc_send_ppkts(struct buffer *buf, struct ssl_sock_ctx *ctx) if (ret < 0) { TRACE_ERROR("sendto fatal error", QUIC_EV_CONN_SPPKTS, qc, first_pkt); qc_kill_conn(qc); - qc_free_tx_coalesced_pkts(qc, first_pkt); + qc_free_tx_coalesced_pkts(first_pkt); b_del(buf, dglen + headlen); - qc_purge_tx_buf(qc, buf); + qc_purge_tx_buf(buf); goto leave; } else if (!ret) { @@ -4962,7 +4962,7 @@ static int qc_dgrams_retransmit(struct quic_conn *qc) if (!LIST_ISEMPTY(&frms1)) { aqel->pktns->tx.pto_probe = 1; if (!qc_send_app_probing(qc, &frms1)) { - qc_free_frm_list(&frms2, qc); + qc_free_frm_list(&frms2); goto leave; }