]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: channel: Remove CF_READ_ACTIVITY
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 20 Dec 2022 17:14:56 +0000 (18:14 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 9 Jan 2023 17:41:08 +0000 (18:41 +0100)
Thanks to previous changes, CF_READ_ACTIVITY flags can be removed.
Everywhere it was used, its value is now directly used
(CF_READ_EVENT|CF_READ_ERROR).

include/haproxy/channel-t.h
include/haproxy/channel.h
src/stconn.c
src/stream.c

index 56385ebd10e66d28addaf1903a0ae971006ff508..5996db427ba82efb92ed672c7fcba4f4999f8c48 100644 (file)
@@ -57,7 +57,6 @@
 /* unused: 0x00000002 */
 #define CF_READ_TIMEOUT   0x00000004  /* timeout while waiting for producer */
 #define CF_READ_ERROR     0x00000008  /* unrecoverable error on producer side */
-#define CF_READ_ACTIVITY  (CF_READ_EVENT|CF_READ_ERROR)
 
 /* unused: 0x00000010 */
 #define CF_SHUTR          0x00000020  /* producer has already shut down */
 #define CF_ISRESP         0x80000000  /* 0 = request channel, 1 = response channel */
 
 /* Masks which define input events for stream analysers */
-#define CF_MASK_ANALYSER  (CF_READ_ATTACHED|CF_READ_ACTIVITY|CF_READ_TIMEOUT|CF_ANA_TIMEOUT|CF_WRITE_ACTIVITY|CF_WAKE_ONCE)
+#define CF_MASK_ANALYSER  (CF_READ_ATTACHED|CF_READ_EVENT|CF_READ_ERROR|CF_READ_TIMEOUT|CF_ANA_TIMEOUT|CF_WRITE_ACTIVITY|CF_WAKE_ONCE)
 
 /* Mask for static flags which cause analysers to be woken up when they change */
 #define CF_MASK_STATIC    (CF_SHUTR|CF_SHUTW|CF_SHUTR_NOW|CF_SHUTW_NOW)
index b8d6c81de7153daa73b07e351ccd8930ed943ca4..3b024e8a739d88229e3602d9a899a987e397f32b 100644 (file)
@@ -530,7 +530,7 @@ static inline int channel_output_closed(struct channel *chn)
  */
 static inline void channel_check_timeouts(struct channel *chn)
 {
-       if (likely(!(chn->flags & (CF_SHUTR|CF_READ_TIMEOUT|CF_READ_ACTIVITY|CF_READ_NOEXP))) &&
+       if (likely(!(chn->flags & (CF_SHUTR|CF_READ_TIMEOUT|CF_READ_EVENT|CF_READ_ERROR|CF_READ_NOEXP))) &&
            unlikely(tick_is_expired(chn->rex, now_ms)))
                chn->flags |= CF_READ_TIMEOUT;
 
index 18766867cee87a4e39e788baa1491eac9ab1dccc..24b04cc2d6d5a02972b1ed306a16c83f3eaf4d8d 100644 (file)
@@ -1226,7 +1226,7 @@ static void sc_notify(struct stconn *sc)
 
                task_queue(task);
        }
-       if (ic->flags & CF_READ_ACTIVITY)
+       if (ic->flags & (CF_READ_EVENT|CF_READ_ERROR))
                ic->flags &= ~CF_READ_DONTWAIT;
 }
 
index 0b951ce94c587b1544db2be3e5e04c79ce1ece90..f727788c5f15e34ffa3a657a04216249d8358aa4 100644 (file)
@@ -1782,7 +1782,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
                 * timeout needs to be refreshed.
                 */
                if (!((req->flags | res->flags) &
-                     (CF_SHUTR|CF_READ_ACTIVITY|CF_READ_TIMEOUT|CF_SHUTW|
+                     (CF_SHUTR|CF_READ_EVENT|CF_READ_ERROR|CF_READ_TIMEOUT|CF_SHUTW|
                       CF_WRITE_ACTIVITY|CF_WRITE_TIMEOUT|CF_ANA_TIMEOUT)) &&
                    !(s->flags & SF_CONN_EXP) &&
                    !((sc_ep_get(scf) | scb->flags) & SE_FL_ERROR) &&