]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: muxes: Wakup the data layer from a mux stream with TASK_WOKEN_IO state
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Mar 2026 16:13:48 +0000 (17:13 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Mar 2026 14:10:34 +0000 (15:10 +0100)
Now, when a mux stream is waking its data layer up for receives or sends, it
uses the TASK_WOKEN_IO state. The state is not used by the stconn I/O
callback function for now.

src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_quic.c
src/mux_spop.c

index 45adb9fbb3b4ef05ebd65482ac19693f179d51f3..c34514ae152b68e6b1059e91b83decc30dd87c2d 100644 (file)
@@ -862,7 +862,7 @@ static void fcgi_strm_notify_recv(struct fcgi_strm *fstrm)
 {
        if (fstrm->subs && (fstrm->subs->events & SUB_RETRY_RECV)) {
                TRACE_POINT(FCGI_EV_STRM_WAKE, fstrm->fconn->conn, fstrm);
-               tasklet_wakeup(fstrm->subs->tasklet);
+               tasklet_wakeup(fstrm->subs->tasklet, TASK_WOKEN_IO);
                fstrm->subs->events &= ~SUB_RETRY_RECV;
                if (!fstrm->subs->events)
                        fstrm->subs = NULL;
@@ -875,7 +875,7 @@ static void fcgi_strm_notify_send(struct fcgi_strm *fstrm)
        if (fstrm->subs && (fstrm->subs->events & SUB_RETRY_SEND)) {
                TRACE_POINT(FCGI_EV_STRM_WAKE, fstrm->fconn->conn, fstrm);
                fstrm->flags |= FCGI_SF_NOTIFIED;
-               tasklet_wakeup(fstrm->subs->tasklet);
+               tasklet_wakeup(fstrm->subs->tasklet, TASK_WOKEN_IO);
                fstrm->subs->events &= ~SUB_RETRY_SEND;
                if (!fstrm->subs->events)
                        fstrm->subs = NULL;
index 22b3daea7f9a55b0faa36245f2c1169152dd572c..fa9c20119276f2122cb666cc6e8eaa407888035d 100644 (file)
@@ -3716,7 +3716,7 @@ static void h1_wake_stream_for_recv(struct h1s *h1s)
 {
        if (h1s && h1s->subs && h1s->subs->events & SUB_RETRY_RECV) {
                TRACE_POINT(H1_EV_STRM_WAKE, h1s->h1c->conn, h1s);
-               tasklet_wakeup(h1s->subs->tasklet);
+               tasklet_wakeup(h1s->subs->tasklet, TASK_WOKEN_IO);
                h1s->subs->events &= ~SUB_RETRY_RECV;
                if (!h1s->subs->events)
                        h1s->subs = NULL;
@@ -3726,7 +3726,7 @@ static void h1_wake_stream_for_send(struct h1s *h1s)
 {
        if (h1s && h1s->subs && h1s->subs->events & SUB_RETRY_SEND) {
                TRACE_POINT(H1_EV_STRM_WAKE, h1s->h1c->conn, h1s);
-               tasklet_wakeup(h1s->subs->tasklet);
+               tasklet_wakeup(h1s->subs->tasklet, TASK_WOKEN_IO);
                h1s->subs->events &= ~SUB_RETRY_SEND;
                if (!h1s->subs->events)
                        h1s->subs = NULL;
index 551aff33f31fda549b24ecd7c502810a7cf8c31a..d09eb7110d6c904e6874960abcc6019f7d003d14 100644 (file)
@@ -1668,9 +1668,10 @@ static void __maybe_unused h2s_notify_recv(struct h2s *h2s)
                TRACE_POINT(H2_EV_STRM_WAKE, h2s->h2c->conn, h2s);
                if (h2s->h2c->next_tasklet ||
                    (th_ctx->current && th_ctx->current->process == h2_io_cb))
-                       h2s->h2c->next_tasklet = tasklet_wakeup_after(h2s->h2c->next_tasklet, h2s->subs->tasklet);
+                       h2s->h2c->next_tasklet = tasklet_wakeup_after(h2s->h2c->next_tasklet, h2s->subs->tasklet,
+                                                                     TASK_WOKEN_IO);
                else
-                       tasklet_wakeup(h2s->subs->tasklet);
+                       tasklet_wakeup(h2s->subs->tasklet, TASK_WOKEN_IO);
                h2s->subs->events &= ~SUB_RETRY_RECV;
                if (!h2s->subs->events)
                        h2s->subs = NULL;
@@ -1683,7 +1684,7 @@ static void __maybe_unused h2s_notify_send(struct h2s *h2s)
        if (h2s->subs && h2s->subs->events & SUB_RETRY_SEND) {
                TRACE_POINT(H2_EV_STRM_WAKE, h2s->h2c->conn, h2s);
                h2s->flags |= H2_SF_NOTIFIED;
-               tasklet_wakeup(h2s->subs->tasklet);
+               tasklet_wakeup(h2s->subs->tasklet, TASK_WOKEN_IO);
                h2s->subs->events &= ~SUB_RETRY_SEND;
                if (!h2s->subs->events)
                        h2s->subs = NULL;
index 1ba2d65a86dd76296a817393deefce39a2aba1fa..248c787bbe46cb9fbeb34edce3e6b7524f7dff76 100644 (file)
@@ -548,7 +548,7 @@ void qcs_notify_recv(struct qcs *qcs)
 {
        if (qcs->subs && qcs->subs->events & SUB_RETRY_RECV) {
                TRACE_POINT(QMUX_EV_STRM_WAKE, qcs->qcc->conn, qcs);
-               tasklet_wakeup(qcs->subs->tasklet);
+               tasklet_wakeup(qcs->subs->tasklet, TASK_WOKEN_IO);
                qcs->subs->events &= ~SUB_RETRY_RECV;
                if (!qcs->subs->events)
                        qcs->subs = NULL;
@@ -559,7 +559,7 @@ void qcs_notify_send(struct qcs *qcs)
 {
        if (qcs->subs && qcs->subs->events & SUB_RETRY_SEND) {
                TRACE_POINT(QMUX_EV_STRM_WAKE, qcs->qcc->conn, qcs);
-               tasklet_wakeup(qcs->subs->tasklet);
+               tasklet_wakeup(qcs->subs->tasklet, TASK_WOKEN_IO);
                qcs->subs->events &= ~SUB_RETRY_SEND;
                if (!qcs->subs->events)
                        qcs->subs = NULL;
index 082108f831fec172274bd94e8123cb179b23e9ab..1fa07e7fb7773a719895140c195232d54e42a529 100644 (file)
@@ -952,7 +952,7 @@ static void spop_strm_notify_recv(struct spop_strm *spop_strm)
 {
        if (spop_strm->subs && (spop_strm->subs->events & SUB_RETRY_RECV)) {
                TRACE_POINT(SPOP_EV_STRM_WAKE, spop_strm->spop_conn->conn, spop_strm);
-               tasklet_wakeup(spop_strm->subs->tasklet);
+               tasklet_wakeup(spop_strm->subs->tasklet, TASK_WOKEN_IO);
                spop_strm->subs->events &= ~SUB_RETRY_RECV;
                if (!spop_strm->subs->events)
                        spop_strm->subs = NULL;
@@ -965,7 +965,7 @@ static void spop_strm_notify_send(struct spop_strm *spop_strm)
        if (spop_strm->subs && (spop_strm->subs->events & SUB_RETRY_SEND)) {
                TRACE_POINT(SPOP_EV_STRM_WAKE, spop_strm->spop_conn->conn, spop_strm);
                spop_strm->flags |= SPOP_SF_NOTIFIED;
-               tasklet_wakeup(spop_strm->subs->tasklet);
+               tasklet_wakeup(spop_strm->subs->tasklet, TASK_WOKEN_IO);
                spop_strm->subs->events &= ~SUB_RETRY_SEND;
                if (!spop_strm->subs->events)
                        spop_strm->subs = NULL;