From: Willy Tarreau Date: Tue, 9 Mar 2021 16:58:02 +0000 (+0100) Subject: BUG/MEDIUM: ssl: properly remove the TASK_HEAVY flag at end of handshake X-Git-Tag: v2.4-dev12~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c48edba4f45bb78f41af7d79d3c176710fe6a90;p=thirdparty%2Fhaproxy.git 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. --- 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,