CLEANUP: connection: remove unused CO_FL_WAIT_DATA

Very early in the connection rework process leading to v1.5-dev12, commit
56a77e5 ("MEDIUM: connection: complete the polling cleanups") marked the
end of use for this flag which since was never set anymore, but it continues
to be tested. Let's kill it now.
This commit is contained in:
Willy Tarreau 2017-04-26 16:25:12 +02:00
parent ed936c5d37
commit 2686dcad1e
5 changed files with 8 additions and 9 deletions

View File

@ -122,7 +122,6 @@ void show_conn_flags(unsigned int f)
SHOW_FLAG(f, CO_FL_ADDR_TO_SET);
SHOW_FLAG(f, CO_FL_ADDR_FROM_SET);
SHOW_FLAG(f, CO_FL_WAIT_ROOM);
SHOW_FLAG(f, CO_FL_WAIT_DATA);
SHOW_FLAG(f, CO_FL_XPRT_READY);
SHOW_FLAG(f, CO_FL_CTRL_READY);
SHOW_FLAG(f, CO_FL_CURR_WR_ENA);

View File

@ -178,7 +178,7 @@ void conn_update_data_polling(struct connection *c);
*/
static inline void conn_refresh_polling_flags(struct connection *conn)
{
conn->flags &= ~(CO_FL_WAIT_ROOM | CO_FL_WAIT_DATA);
conn->flags &= ~CO_FL_WAIT_ROOM;
if (conn_ctrl_ready(conn)) {
unsigned int flags = conn->flags & ~(CO_FL_CURR_RD_ENA | CO_FL_CURR_WR_ENA);

View File

@ -74,12 +74,12 @@ enum {
CO_FL_CTRL_READY = 0x00000100, /* FD was registered, fd_delete() needed */
CO_FL_XPRT_READY = 0x00000200, /* xprt_init() done, xprt_close() needed */
/* These flags are used by data layers to indicate they had to stop
* sending data because a buffer was empty (WAIT_DATA) or stop receiving
* data because a buffer was full (WAIT_ROOM). The connection handler
* clears them before first calling the I/O and data callbacks.
/* unused : 0x00000400 */
/* This flag is used by data layers to indicate they had to stop
* receiving data because a buffer was full. The connection handler
* clears it before first calling the I/O and data callbacks.
*/
CO_FL_WAIT_DATA = 0x00000400, /* data source is empty */
CO_FL_WAIT_ROOM = 0x00000800, /* data sink is full */
/* These flags are used to report whether the from/to addresses are set or not */

View File

@ -109,7 +109,7 @@ void conn_fd_handler(int fd)
}
if (conn->xprt && fd_send_ready(fd) &&
((conn->flags & (CO_FL_DATA_WR_ENA|CO_FL_WAIT_DATA|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_DATA_WR_ENA)) {
((conn->flags & (CO_FL_DATA_WR_ENA|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_DATA_WR_ENA)) {
/* force reporting of activity by clearing the previous flags :
* we'll have at least ERROR or CONNECTED at the end of an I/O,
* both of which will be detected below.

View File

@ -633,7 +633,7 @@ static void si_conn_send(struct connection *conn)
/* when we're here, we already know that there is no spliced
* data left, and that there are sendable buffered data.
*/
if (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_WR_SH | CO_FL_DATA_WR_SH | CO_FL_WAIT_DATA | CO_FL_HANDSHAKE))) {
if (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_WR_SH | CO_FL_DATA_WR_SH | CO_FL_HANDSHAKE))) {
/* check if we want to inform the kernel that we're interested in
* sending more data after this call. We want this if :
* - we're about to close after this last send and want to merge