WIP/BUG/MEDIUM: mux-quic: Notify upper layer for send if everything was sent

In qmux_ctrl_send(), when everything was sent, we must try to notify the
upper layer. Before, it was only performed if the stream buffer was full or
the QCS was waiting for more room.

But once the upper layer is subscribe for sends and everything was sent,
there is no reason to not wake it up. And it seems to be an issue when large
buffers are used on the SC.

NOTE: must be reviewed with Amaury first !
This commit is contained in:
Christopher Faulet 2026-02-13 15:55:53 +01:00
parent c03f2bd07f
commit 27110b7be1

View file

@ -630,10 +630,11 @@ static void qmux_ctrl_send(struct qc_stream_desc *stream, uint64_t data, uint64_
QMUX_EV_QCS_SEND, qcc->conn, qcs);
}
/* Release buffer if everything sent and buf is full or stream is waiting for room. */
if (!qcs_prep_bytes(qcs) &&
(b_full(&qcs->stream->buf->buf) || qcs->flags & QC_SF_BLK_MROOM)) {
qc_stream_buf_release(qcs->stream);
qcs->flags &= ~QC_SF_BLK_MROOM;
if (!qcs_prep_bytes(qcs)) {
if (b_full(&qcs->stream->buf->buf) || qcs->flags & QC_SF_BLK_MROOM) {
qc_stream_buf_release(qcs->stream);
qcs->flags &= ~QC_SF_BLK_MROOM;
}
qcs_notify_send(qcs);
}