From e257d9e8ec576b92c0d6a2fdabdef5085102ec9a Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 3 Dec 2021 14:39:29 +0100 Subject: [PATCH] MEDIUM: mux-quic: wake up xprt on data transferred On qc_send, data are transferred for each stream from their qcs.buf to the qcs.xprt_buf. Wake up the xprt to warn about new data available for transmission. --- src/mux_quic.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 1f49e010c..c11e1cedd 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -164,6 +164,7 @@ static int qcs_push_frame(struct qcs *qcs, struct buffer *payload, int fin, uint static int qc_send(struct qcc *qcc) { struct eb64_node *node; + int xprt_wake = 0; int ret; fprintf(stderr, "%s\n", __func__); @@ -190,10 +191,10 @@ static int qc_send(struct qcc *qcc) if (ret < 0) ABORT_NOW(); - if (ret > 0) + if (ret > 0) { qcs_notify_send(qcs); - - /* TODO wake-up xprt if data were transfered */ + xprt_wake = 1; + } fprintf(stderr, "%s ret=%d\n", __func__, ret); qcs->tx.offset += ret; @@ -206,6 +207,9 @@ static int qc_send(struct qcc *qcc) node = eb64_next(node); } + if (xprt_wake) + tasklet_wakeup(((struct ssl_sock_ctx *)(qcc->conn->xprt_ctx))->wait_event.tasklet); + return ret; }