diff --git a/src/quic_frame.c b/src/quic_frame.c
index 386c409..f590be2 100644
--- a/src/quic_frame.c
+++ b/src/quic_frame.c
@@ -279,7 +279,7 @@
 
 	ar = eb64_last(&tx_ack->arngs->root);
 	ar_node = eb64_entry(ar, struct quic_arng_node, first);
-	TRACE_PROTO("ack range", QUIC_EV_CONN_PRSAFRM,
+	TRACE_DEVEL("ack range", QUIC_EV_CONN_PRSAFRM,
 	            qc,, &ar_node->last, &ar_node->first.key);
 	if (!quic_enc_int(buf, end, ar_node->last) ||
 	    !quic_enc_int(buf, end, tx_ack->ack_delay) ||
@@ -289,7 +289,7 @@
 
 	while ((prev_ar = eb64_prev(ar))) {
 		prev_ar_node = eb64_entry(prev_ar, struct quic_arng_node, first);
-		TRACE_PROTO("ack range", QUIC_EV_CONN_PRSAFRM, qc,,
+		TRACE_DEVEL("ack range", QUIC_EV_CONN_PRSAFRM, qc,,
 		            &prev_ar_node->last, &prev_ar_node->first.key);
 		if (!quic_enc_int(buf, end, ar_node->first.key - prev_ar_node->last - 2) ||
 		    !quic_enc_int(buf, end, prev_ar_node->last - prev_ar_node->first.key))
@@ -1085,34 +1085,39 @@
                  const unsigned char **buf, const unsigned char *end,
                  struct quic_conn *qc)
 {
+	int ret = 0;
 	const struct quic_frame_parser *parser;
 
+	TRACE_ENTER(QUIC_EV_CONN_PRSFRM, qc);
 	if (end <= *buf) {
 		TRACE_DEVEL("wrong frame", QUIC_EV_CONN_PRSFRM, qc);
-		return 0;
+		goto leave;
 	}
 
 	frm->type = *(*buf)++;
 	if (frm->type >= QUIC_FT_MAX) {
 		TRACE_DEVEL("wrong frame type", QUIC_EV_CONN_PRSFRM, qc, frm);
-		return 0;
+		goto leave;
 	}
 
 	parser = &quic_frame_parsers[frm->type];
 	if (!(parser->mask & (1U << pkt->type))) {
 		TRACE_DEVEL("unauthorized frame", QUIC_EV_CONN_PRSFRM, qc, frm);
-		return 0;
+		goto leave;
 	}
 
 	TRACE_PROTO("frame", QUIC_EV_CONN_PRSFRM, qc, frm);
 	if (!parser->func(frm, qc, buf, end)) {
 		TRACE_DEVEL("parsing error", QUIC_EV_CONN_PRSFRM, qc, frm);
-		return 0;
+		goto leave;
 	}
 
 	pkt->flags |= parser->flags;
 
-	return 1;
+	ret = 1;
+ leave:
+	TRACE_LEAVE(QUIC_EV_CONN_PRSFRM, qc);
+	return ret;
 }
 
 /* Encode <frm> QUIC frame into <buf> buffer.
@@ -1122,29 +1127,34 @@
                  struct quic_frame *frm, struct quic_tx_packet *pkt,
                  struct quic_conn *qc)
 {
+	int ret = 0;
 	const struct quic_frame_builder *builder;
 
+	TRACE_ENTER(QUIC_EV_CONN_BFRM, qc);
 	builder = &quic_frame_builders[frm->type];
 	if (!(builder->mask & (1U << pkt->type))) {
 		/* XXX This it a bug to send an unauthorized frame with such a packet type XXX */
-		TRACE_DEVEL("frame skipped", QUIC_EV_CONN_BFRM, qc, frm);
+		TRACE_ERROR("unauthorized frame", QUIC_EV_CONN_BFRM, qc, frm);
 		BUG_ON(!(builder->mask & (1U << pkt->type)));
 	}
 
 	if (end <= *buf) {
 		TRACE_DEVEL("not enough room", QUIC_EV_CONN_BFRM, qc, frm);
-		return 0;
+		goto leave;
 	}
 
 	TRACE_PROTO("frame", QUIC_EV_CONN_BFRM, qc, frm);
 	*(*buf)++ = frm->type;
 	if (!quic_frame_builders[frm->type].func(buf, end, frm, qc)) {
 		TRACE_DEVEL("frame building error", QUIC_EV_CONN_BFRM, qc, frm);
-		return 0;
+		goto leave;
 	}
 
 	pkt->flags |= builder->flags;
 
-	return 1;
+	ret = 1;
+ leave:
+	TRACE_LEAVE(QUIC_EV_CONN_BFRM, qc);
+	return ret;
 }
 
