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 56385eb..5996db4 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 b8d6c81..3b024e8 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 1876686..24b04cc 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 0b951ce..f727788 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) &&