From: Amaury Denoyelle Date: Wed, 3 May 2023 13:30:04 +0000 (+0200) Subject: MINOR: mux-quic: wake up after recv only if avail data X-Git-Tag: v2.8-dev10~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8901d2c86a3aa0aaba29a3c68debec183ca3031;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index 7adb121c8a..3ed1c1333f 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -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); }