]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: mux_quic: simplify MUX_CTL_GET_NBSTRM
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 6 May 2026 07:08:35 +0000 (09:08 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 6 May 2026 08:21:16 +0000 (10:21 +0200)
Since the previous patch, accounting of HTTP requests in progress on MUX
QUIC as been simplified. Now QCC <nb_hreq> identifies them until the QCS
free.

Thus, MUX_CTL_GET_NBSTRM can be simplified. Instead of relying on
<nb_sc> plus the <opening_list>, simply return <nb_hreq> value which
should be slighly identical.

src/mux_quic.c

index 29d17947d7c5cd2ea7b81179ce34df93e8de6607..ce27cc728e459e1394e6f59c3e8ef018b75b3c63 100644 (file)
@@ -4607,14 +4607,8 @@ static int qmux_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *ou
        case MUX_CTL_GET_GLITCHES:
                return qcc->glitches;
 
-       case MUX_CTL_GET_NBSTRM: {
-               struct qcs *qcs;
-               unsigned int nb_strm = qcc->nb_sc;
-
-               list_for_each_entry(qcs, &qcc->opening_list, el_opening)
-                       nb_strm++;
-               return nb_strm;
-       }
+       case MUX_CTL_GET_NBSTRM:
+               return qcc->nb_hreq;
 
        case MUX_CTL_GET_MAXSTRM:
                return qcc->lfctl.ms_bidi_init;