]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: add traces on frame parsing functions
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 6 Jul 2022 13:44:16 +0000 (15:44 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 11 Jul 2022 14:24:03 +0000 (16:24 +0200)
Add traces for parsing functions for MAX_DATA and MAX_STREAM_DATA.

src/mux_quic.c

index 4c2e5a170bea47a9ec1b36dc6a2c03a8e0cfc5d0..cb3e362ff047a6caf42c9b6af3d8cefdbd72569e 100644 (file)
@@ -704,14 +704,19 @@ int qcc_recv(struct qcc *qcc, uint64_t id, uint64_t len, uint64_t offset,
  */
 int qcc_recv_max_data(struct qcc *qcc, uint64_t max)
 {
+       TRACE_ENTER(QMUX_EV_QCC_RECV, qcc->conn);
+
        if (qcc->rfctl.md < max) {
                qcc->rfctl.md = max;
+               TRACE_DEVEL("increase remote max-data", QMUX_EV_QCC_RECV, qcc->conn);
 
                if (qcc->flags & QC_CF_BLK_MFCTL) {
                        qcc->flags &= ~QC_CF_BLK_MFCTL;
                        tasklet_wakeup(qcc->wait_event.tasklet);
                }
        }
+
+       TRACE_LEAVE(QMUX_EV_QCC_RECV, qcc->conn);
        return 0;
 }
 
@@ -725,11 +730,14 @@ int qcc_recv_max_stream_data(struct qcc *qcc, uint64_t id, uint64_t max)
        struct qcs *qcs;
        struct eb64_node *node;
 
+       TRACE_ENTER(QMUX_EV_QCC_RECV, qcc->conn);
+
        node = eb64_lookup(&qcc->streams_by_id, id);
        if (node) {
                qcs = eb64_entry(node, struct qcs, by_id);
                if (max > qcs->tx.msd) {
                        qcs->tx.msd = max;
+                       TRACE_DEVEL("increase remote max-stream-data", QMUX_EV_QCC_RECV|QMUX_EV_QCS_RECV, qcc->conn, qcs);
 
                        if (qcs->flags & QC_SF_BLK_SFCTL) {
                                qcs->flags &= ~QC_SF_BLK_SFCTL;
@@ -738,6 +746,7 @@ int qcc_recv_max_stream_data(struct qcc *qcc, uint64_t id, uint64_t max)
                }
        }
 
+       TRACE_LEAVE(QMUX_EV_QCC_RECV, qcc->conn);
        return 0;
 }