]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: mux-quic: remove unneeded fields in qcc
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 25 May 2023 08:15:46 +0000 (10:15 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 26 May 2023 15:17:00 +0000 (17:17 +0200)
Remove fields from qcc structure which are unused.

This should be backported up to 2.7.

include/haproxy/mux_quic-t.h
src/mux_quic.c

index 204258a5e955cceffdd0e9ed51b29818c388b944..657f943862dbbc7f9db753664fbe76dec4e796ee 100644 (file)
@@ -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 */
index 7c74bc4ad291c45e16baf708324c8af3af8a3616..047a6a6362556c12afdfde011f775be426741741 100644 (file)
@@ -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;