]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stconn: rename SE_FL_WANT_GET to SE_FL_WILL_CONSUME
authorWilly Tarreau <w@1wt.eu>
Wed, 25 May 2022 16:00:26 +0000 (18:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:35 +0000 (19:33 +0200)
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.

dev/flags/flags.c
include/haproxy/conn_stream-t.h
include/haproxy/conn_stream.h

index 6bac4c908127caa9198ab0a5f968d63af8c532e8..f5c1478691c69d4eb2fd954f65e856363f2e6516 100644 (file)
@@ -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);
index 601018a7fa36a49bc00a0a870673e8dceb26d72e..ab6463761eaea2f50f0a94574630fc75cd0df2e2 100644 (file)
@@ -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,*/
index 6317e06d58ff2cc208fe88fabb6d07d92ca1d4bf..82f533ac7ca580f163621d2df1558a755788d95a 100644 (file)
@@ -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 */