MINOR: h3: mark control stream as metadata

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.
This commit is contained in:
Amaury Denoyelle
2024-08-19 10:28:40 +02:00
parent 4c4bf26f44
commit f9777bea30

View File

@@ -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) {