]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Add traces in qc_set_timer() (scheduling)
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 22 Mar 2022 14:37:41 +0000 (15:37 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 23 Mar 2022 08:01:45 +0000 (09:01 +0100)
This should be helpful to diagnose some issues: timer task not
run when it should run.

src/xprt_quic.c

index 2aba3f628166b394ec0f504a45f04fc01acf42c9..4e14bad6e92ffd26954db9f2d5903a286c258322 100644 (file)
@@ -657,10 +657,14 @@ static inline void qc_set_timer(struct quic_conn *qc)
                qc->timer = pto;
  out:
        if (qc->timer_task && qc->timer != TICK_ETERNITY) {
-               if (tick_is_expired(qc->timer, now_ms))
+               if (tick_is_expired(qc->timer, now_ms)) {
+                       TRACE_PROTO("wakeup asap timer task", QUIC_EV_CONN_STIMER, qc);
                        task_wakeup(qc->timer_task, TASK_WOKEN_MSG);
-               else
+               }
+               else {
+                       TRACE_PROTO("timer task scheduling", QUIC_EV_CONN_STIMER, qc);
                        task_schedule(qc->timer_task, qc->timer);
+               }
        }
        TRACE_LEAVE(QUIC_EV_CONN_STIMER, qc, pktns);
 }