MINOR: mux-quic: wake up after recv only if avail data

When HTX content is transferred from qcs instance to upper stream
endpoint, a wakeup is conducted for MUX tasklet. However, this is only
necessary if demux was interrupted due to a full QCS HTX buffer.

This should be backported up to 2.7.
This commit is contained in:
Amaury Denoyelle 2023-05-03 15:30:04 +02:00
parent 8d44bfaf0b
commit b8901d2c86

View File

@ -2574,7 +2574,14 @@ static size_t qc_recv_buf(struct stconn *sc, struct buffer *buf,
}
}
if (ret) {
/* Restart demux if it was interrupted on full buffer. */
if (ret && qcs->flags & QC_SF_DEM_FULL) {
/* There must be data left for demux if it was interrupted on
* full buffer. If this assumption is incorrect wakeup is not
* necessary.
*/
BUG_ON(!ncb_data(&qcs->rx.ncbuf, 0));
qcs->flags &= ~QC_SF_DEM_FULL;
tasklet_wakeup(qcs->qcc->wait_event.tasklet);
}