From: Amaury Denoyelle Date: Thu, 25 May 2023 08:15:46 +0000 (+0200) Subject: CLEANUP: mux-quic: remove unneeded fields in qcc X-Git-Tag: v2.8.0~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b41dfd8340e25a5f3bfd87627b4d62d384b3f31;p=thirdparty%2Fhaproxy.git CLEANUP: mux-quic: remove unneeded fields in qcc Remove fields from qcc structure which are unused. This should be backported up to 2.7. --- diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index 204258a5e9..657f943862 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -42,16 +42,7 @@ struct qcc { uint32_t flags; /* QC_CF_* */ struct { - uint64_t max_streams; /* maximum number of concurrent streams */ uint64_t nb_streams; /* Number of open streams */ - struct { - uint64_t max_data; /* Maximum number of bytes which may be received */ - uint64_t bytes; /* Number of bytes received */ - } rx; - struct { - uint64_t max_data; /* Maximum number of bytes which may be sent */ - uint64_t bytes; /* Number of bytes sent */ - } tx; } strms[QCS_MAX_TYPES]; /* flow-control fields set by us enforced on our side. */ @@ -82,9 +73,6 @@ struct qcc { uint64_t msd_uni_l; /* initial max-stream-data from peer on local uni streams */ } rfctl; - struct { - uint64_t max_data; /* Maximum number of bytes which may be received */ - } rx; struct { uint64_t offsets; /* sum of all offsets prepared */ uint64_t sent_offsets; /* sum of all offset sent */ diff --git a/src/mux_quic.c b/src/mux_quic.c index 7c74bc4ad2..047a6a6362 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2523,30 +2523,12 @@ static int qc_init(struct connection *conn, struct proxy *prx, /* Server parameters, params used for RX flow control. */ lparams = &conn->handle.qc->rx.params; - qcc->rx.max_data = lparams->initial_max_data; qcc->tx.sent_offsets = qcc->tx.offsets = 0; - /* Client initiated streams must respect the server flow control. */ - qcc->strms[QCS_CLT_BIDI].max_streams = lparams->initial_max_streams_bidi; qcc->strms[QCS_CLT_BIDI].nb_streams = 0; - qcc->strms[QCS_CLT_BIDI].rx.max_data = 0; - qcc->strms[QCS_CLT_BIDI].tx.max_data = lparams->initial_max_stream_data_bidi_remote; - - qcc->strms[QCS_CLT_UNI].max_streams = lparams->initial_max_streams_uni; qcc->strms[QCS_CLT_UNI].nb_streams = 0; - qcc->strms[QCS_CLT_UNI].rx.max_data = 0; - qcc->strms[QCS_CLT_UNI].tx.max_data = lparams->initial_max_stream_data_uni; - - /* Server initiated streams must respect the server flow control. */ - qcc->strms[QCS_SRV_BIDI].max_streams = 0; qcc->strms[QCS_SRV_BIDI].nb_streams = 0; - qcc->strms[QCS_SRV_BIDI].rx.max_data = lparams->initial_max_stream_data_bidi_local; - qcc->strms[QCS_SRV_BIDI].tx.max_data = 0; - - qcc->strms[QCS_SRV_UNI].max_streams = 0; qcc->strms[QCS_SRV_UNI].nb_streams = 0; - qcc->strms[QCS_SRV_UNI].rx.max_data = lparams->initial_max_stream_data_uni; - qcc->strms[QCS_SRV_UNI].tx.max_data = 0; LIST_INIT(&qcc->lfctl.frms); qcc->lfctl.ms_bidi = qcc->lfctl.ms_bidi_init = lparams->initial_max_streams_bidi;