From 2f531116edef5bbc30f6e9236d48887e85ea9cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Fri, 10 Feb 2023 14:44:51 +0100 Subject: [PATCH] MINOR: quic: Add traces to qc_kill_conn() Very minor modification to help in debugging issues. Must be backported to 2.7. --- include/haproxy/quic_conn-t.h | 1 + src/quic_conn.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/haproxy/quic_conn-t.h b/include/haproxy/quic_conn-t.h index cbf3f686a..79f806e06 100644 --- a/include/haproxy/quic_conn-t.h +++ b/include/haproxy/quic_conn-t.h @@ -224,6 +224,7 @@ enum quic_pkt_type { #define QUIC_EV_CONN_SUB (1ULL << 46) #define QUIC_EV_CONN_ELEVELSEL (1ULL << 47) #define QUIC_EV_CONN_RCV (1ULL << 48) +#define QUIC_EV_CONN_KILL (1ULL << 49) /* Similar to kernel min()/max() definitions. */ #define QUIC_MIN(a, b) ({ \ diff --git a/src/quic_conn.c b/src/quic_conn.c index 5b9d5a327..0de12f354 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -738,8 +738,10 @@ static inline int quic_peer_validated_addr(struct quic_conn *qc) /* To be called to kill a connection as soon as possible (without sending any packet). */ void qc_kill_conn(struct quic_conn *qc) { + TRACE_ENTER(QUIC_EV_CONN_KILL, qc); qc->flags |= QUIC_FL_CONN_TO_KILL; task_wakeup(qc->idle_timer_task, TASK_WOKEN_OTHER); + TRACE_LEAVE(QUIC_EV_CONN_KILL, qc); } /* Set the timer attached to the QUIC connection with as I/O handler and used for