]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic-be: avoid a useless I/O callback wakeup for 0-RTT sessions
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 6 Nov 2025 14:36:43 +0000 (15:36 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 6 Nov 2025 17:14:18 +0000 (18:14 +0100)
For backends and 0-RTT sessions, this patch modifies the ->start() callback to
wake up the I/O callback only if the connection (and the mux) is not ready. Note that
connect_server() has been modified to call this xprt callback just after having
created the mux and installed the mux. Contrary to 1-RTT session, for 0-RTT sessions,
the connections are always ready before calling this ->start xprt callback.

src/xprt_quic.c

index c256f442709202fe10d7cd8e62eed89080f6a3a1..5ab196a3b8fe5d6ec07b97e559ab9964a274d195 100644 (file)
@@ -182,7 +182,8 @@ static int qc_xprt_start(struct connection *conn, void *ctx)
         * is not done for 0-RTT as xprt->start happens before handshake
         * completion.
         */
-       if (qc_is_back(qc) || (qc->flags & QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS))
+       if ((qc_is_back(qc) && !qc_is_conn_ready(qc)) ||
+           (qc->flags & QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS))
                tasklet_wakeup(qc->wait_event.tasklet);
 
        ret = 1;