]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h3: mark control stream as metadata
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 19 Aug 2024 08:28:40 +0000 (10:28 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Aug 2024 15:17:17 +0000 (17:17 +0200)
A current work is performed to change QUIC MUX buffer allocation limit
from a configurable static value to use the size of the congestion
window instead. This change may cause the buffer allocation limit to be
triggered more frequently.

To ensure HTTP/3 control emission is not perturbed by this change, mark
the stream with qcc_send_metadata(). This ensures that buffer allocation
for this stream won't be subject to the connection limit. This is
necessary to guarantee that SETTINGS and GOAWAY frames are emitted.

src/h3.c

index 2898b9e41ed273deb0ea2b98465a1268075bd1ac..c891d9f7167a7e6cfaa7d6399d90748a37c9c241 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -1525,7 +1525,7 @@ static int h3_control_send(struct qcs *qcs, void *ctx)
        }
 
        if (!(res = qcc_get_stream_txbuf(qcs, &err))) {
-               /* Consider alloc failure fatal for control stream even on conn buf limit. */
+               /* Only memory failure can cause buf alloc error for control stream due to qcs_send_metadata() usage. */
                TRACE_ERROR("cannot allocate Tx buffer", H3_EV_TX_FRAME|H3_EV_TX_SETTINGS, qcs->qcc->conn, qcs);
                goto err;
        }
@@ -2401,6 +2401,7 @@ static int h3_finalize(void *ctx)
                goto err;
        }
 
+       qcs_send_metadata(qcs);
        h3c->ctrl_strm = qcs;
 
        if (h3_control_send(qcs, h3c) < 0) {