From: Willy Tarreau Date: Wed, 25 May 2022 16:00:26 +0000 (+0200) Subject: CLEANUP: stconn: rename SE_FL_WANT_GET to SE_FL_WILL_CONSUME X-Git-Tag: v2.6-dev12~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79cf6e1f157bc0ba4111074079333bbfa03019f9;p=thirdparty%2Fhaproxy.git CLEANUP: stconn: rename SE_FL_WANT_GET to SE_FL_WILL_CONSUME This flag indicates the that stream endpoint is willing to consume output data from the stream. Its new name makes this more explicit. The function names will be updated accordingly, which will remove the disturbing "get" everywhere. --- diff --git a/dev/flags/flags.c b/dev/flags/flags.c index 6bac4c9081..f5c1478691 100644 --- a/dev/flags/flags.c +++ b/dev/flags/flags.c @@ -186,7 +186,7 @@ void show_endp_flags(unsigned int f) SHOW_FLAG(f, SE_FL_APPLET_NEED_CONN); SHOW_FLAG(f, SE_FL_HAVE_NO_DATA); - SHOW_FLAG(f, SE_FL_WANT_GET); + SHOW_FLAG(f, SE_FL_WILL_CONSUME); SHOW_FLAG(f, SE_FL_WAIT_DATA); SHOW_FLAG(f, SE_FL_KILL_CONN); SHOW_FLAG(f, SE_FL_WAIT_FOR_HS); diff --git a/include/haproxy/conn_stream-t.h b/include/haproxy/conn_stream-t.h index 601018a7fa..ab6463761e 100644 --- a/include/haproxy/conn_stream-t.h +++ b/include/haproxy/conn_stream-t.h @@ -72,8 +72,8 @@ enum se_flags { */ SE_FL_WAIT_FOR_HS = 0x00200000, /* This stream is waiting for handhskae */ SE_FL_KILL_CONN = 0x00400000, /* must kill the connection when the CS closes */ - SE_FL_WAIT_DATA = 0x00800000, /* CS waits for more outgoing data to send */ - SE_FL_WANT_GET = 0x01000000, /* CS would like to get some data from the buffer */ + SE_FL_WAIT_DATA = 0x00800000, /* stream endpoint cannot work without more data from the stream's output */ + SE_FL_WILL_CONSUME = 0x01000000, /* stream endpoint is interested in consuming more data */ SE_FL_HAVE_NO_DATA = 0x02000000, /* the endpoint has no more data to deliver to the stream */ SE_FL_APP_MASK = 0x02e00000, /* Mask for flags set by the app layer */ /* unused 0x04000000,*/ diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index 6317e06d58..82f533ac7c 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -382,25 +382,25 @@ static inline int cs_tx_blocked(const struct stconn *cs) /* Returns non-zero if the stream connector's endpoint is ready to transmit */ static inline int cs_tx_endp_ready(const struct stconn *cs) { - return sc_ep_test(cs, SE_FL_WANT_GET); + return sc_ep_test(cs, SE_FL_WILL_CONSUME); } /* Report that a stream connector wants to get some data from the output buffer */ static inline void cs_want_get(struct stconn *cs) { - sc_ep_set(cs, SE_FL_WANT_GET); + sc_ep_set(cs, SE_FL_WILL_CONSUME); } /* Report that a stream connector failed to get some data from the output buffer */ static inline void cs_cant_get(struct stconn *cs) { - sc_ep_set(cs, SE_FL_WANT_GET | SE_FL_WAIT_DATA); + sc_ep_set(cs, SE_FL_WILL_CONSUME | SE_FL_WAIT_DATA); } /* Report that a stream connector doesn't want to get data from the output buffer */ static inline void cs_stop_get(struct stconn *cs) { - sc_ep_clr(cs, SE_FL_WANT_GET); + sc_ep_clr(cs, SE_FL_WILL_CONSUME); } #endif /* _HAPROXY_CONN_STREAM_H */