From 4c48edba4f45bb78f41af7d79d3c176710fe6a90 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 9 Mar 2021 17:58:02 +0100 Subject: [PATCH] BUG/MEDIUM: ssl: properly remove the TASK_HEAVY flag at end of handshake Emeric found that SSL+keepalive traffic had dropped quite a bit in the recent changes, which could be bisected to recent commit 9205ab31d ("MINOR: ssl: mark the SSL handshake tasklet as heavy"). Indeed, a first incarnation of this commit made use of the TASK_SELF_WAKING flag but the last version directly used TASK_HEAVY, but it would still continue to remove the already absent TASK_SELF_WAKING one instead of TASK_HEAVY. As such, the SSL traffic remained processed with low granularity. No backport is needed as this is only 2.4. --- src/ssl_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 4ff1d33360..1638996e41 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -5861,7 +5861,7 @@ struct task *ssl_sock_io_cb(struct task *t, void *context, unsigned int state) ssl_sock_handshake(ctx->conn, CO_FL_SSL_WAIT_HS); if (!(ctx->conn->flags & CO_FL_SSL_WAIT_HS)) { /* handshake completed, leave the bulk queue */ - _HA_ATOMIC_AND(&tl->state, ~TASK_SELF_WAKING); + _HA_ATOMIC_AND(&tl->state, ~TASK_HEAVY); } } /* If we had an error, or the handshake is done and I/O is available, -- 2.47.2