]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
OPTIM: mux-fcgi: Reorganise fcgi_conn structure to fill some holes master flx04/master
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jun 2026 11:39:26 +0000 (13:39 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 16 Jun 2026 16:03:01 +0000 (18:03 +0200)
<drl> field was moved before <dsi> and term_evts_log was moved before the
demux buffer. 8 bytes was saved this way.

src/mux_fcgi.c

index 8d81ff8499dee634b6b4229a2b7b392beda9464b..d882a82883c8bdb3cff6ad91a200fb1a951d879a 100644 (file)
@@ -53,11 +53,13 @@ struct fcgi_conn {
        uint32_t streams_limit;               /* maximum number of concurrent streams the peer supports */
        uint32_t flags;                      /* Connection flags: FCGI_CF_* */
 
-       int16_t  dsi;                        /* dmux stream ID (<0 = idle ) */
        uint32_t drl;                        /* demux record length (if dsi >= 0) */
+       int16_t  dsi;                        /* dmux stream ID (<0 = idle ) */
        uint8_t  drt;                        /* demux record type (if dsi >= 0) */
        uint8_t  drp;                        /* demux record padding (if dsi >= 0) */
 
+       uint32_t term_evts_log;              /* Termination events log: first 4 events reported */
+
        struct buffer dbuf;                  /* demux buffer */
        struct buffer mbuf[FCGI_C_MBUF_CNT]; /* mux buffers (ring) */
 
@@ -68,8 +70,6 @@ struct fcgi_conn {
        unsigned int nb_reserved;            /* number of reserved streams */
        unsigned int stream_cnt;             /* total number of streams seen */
 
-       uint32_t term_evts_log;              /* Termination events log: first 4 events reported */
-
        struct proxy *proxy;                 /* the proxy this connection was created for */
        struct fcgi_app *app;                /* FCGI application used by this mux */
        struct task *task;                   /* timeout management task */