From: Christopher Faulet Date: Tue, 20 Dec 2022 17:14:56 +0000 (+0100) Subject: MINOR: channel: Remove CF_READ_ACTIVITY X-Git-Tag: v2.8-dev2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33e03cec5f171d2989cb4ff7b607c72d4ac1a86a;p=thirdparty%2Fhaproxy.git MINOR: channel: Remove CF_READ_ACTIVITY 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). --- diff --git a/include/haproxy/channel-t.h b/include/haproxy/channel-t.h index 56385ebd10..5996db427b 100644 --- a/include/haproxy/channel-t.h +++ b/include/haproxy/channel-t.h @@ -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 */ @@ -123,7 +122,7 @@ #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) diff --git a/include/haproxy/channel.h b/include/haproxy/channel.h index b8d6c81de7..3b024e8a73 100644 --- a/include/haproxy/channel.h +++ b/include/haproxy/channel.h @@ -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; diff --git a/src/stconn.c b/src/stconn.c index 18766867ce..24b04cc2d6 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -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; } diff --git a/src/stream.c b/src/stream.c index 0b951ce94c..f727788c5f 100644 --- a/src/stream.c +++ b/src/stream.c @@ -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) &&