CLEANUP: fd: remove fdtab->flags
These flags were added for TCP_CORK. They were only set at various places
but never checked by any user since TCP_CORK was replaced with MSG_MORE.
Simply get rid of this now.
diff --git a/include/types/fd.h b/include/types/fd.h
index c9b50c2..f45b046 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -51,13 +51,6 @@
#define FD_POLL_DATA (FD_POLL_IN | FD_POLL_OUT)
#define FD_POLL_STICKY (FD_POLL_ERR | FD_POLL_HUP)
-/* bit values for fdtab[fd]->flags. Most of them are used to hold a value
- * consecutive to a behaviour change.
- */
-#define FD_FL_TCP 0x0001 /* socket is TCP */
-#define FD_FL_TCP_NODELAY 0x0002
-#define FD_FL_TCP_NOLING 0x0004 /* lingering disabled */
-
/* info about one given fd */
struct fdtab {
int (*iocb)(int fd); /* I/O handler, returns FD_WAIT_* */
@@ -66,7 +59,6 @@
unsigned char e; /* read and write events status. 4 bits, may be merged into flags' lower bits */
unsigned int s1; /* Position in spec list+1. 0=not in list. */
} spec;
- unsigned short flags; /* various flags precising the exact status of this fd */
unsigned char ev; /* event seen in return of poll() : FD_POLL_* */
};
diff --git a/src/checks.c b/src/checks.c
index 93f93df..cb59d58 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1476,7 +1476,6 @@
fd_insert(fd);
fdtab[fd].owner = t;
fdtab[fd].iocb = &check_iocb;
- fdtab[fd].flags = FD_FL_TCP | FD_FL_TCP_NODELAY;
fd_want_send(fd); /* for connect status */
#ifdef DEBUG_FULL
assert (!EV_FD_ISSET(fd, DIR_RD));
diff --git a/src/frontend.c b/src/frontend.c
index 7380255..b2b6b11 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -197,10 +197,6 @@
s->req->rto = s->fe->timeout.client;
s->rep->wto = s->fe->timeout.client;
- fdtab[cfd].flags = FD_FL_TCP | FD_FL_TCP_NODELAY;
- if (s->fe->options & PR_O_TCP_NOLING)
- fdtab[cfd].flags |= FD_FL_TCP_NOLING;
-
if (unlikely((s->fe->mode == PR_MODE_HTTP && (s->flags & SN_MONITOR)) ||
(s->fe->mode == PR_MODE_HEALTH && ((s->fe->options2 & PR_O2_CHK_ANY) == PR_O2_HTTP_CHK)))) {
/* Either we got a request from a monitoring system on an HTTP instance,
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 99741dc..3773144 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -452,7 +452,6 @@
}
fdtab[fd].owner = conn;
- fdtab[fd].flags = FD_FL_TCP | FD_FL_TCP_NODELAY;
conn->flags = CO_FL_WAIT_L4_CONN; /* connection in progress */
fdtab[fd].iocb = conn_fd_handler;
@@ -694,7 +693,6 @@
listener->state = LI_LISTEN;
fdtab[fd].owner = listener; /* reference the listener instead of a task */
- fdtab[fd].flags = FD_FL_TCP | ((listener->options & LI_O_NOLINGER) ? FD_FL_TCP_NOLING : 0);
fdtab[fd].iocb = listener->proto->accept;
fd_insert(fd);
diff --git a/src/session.c b/src/session.c
index 7f72156..c4323da 100644
--- a/src/session.c
+++ b/src/session.c
@@ -151,7 +151,6 @@
/* finish initialization of the accepted file descriptor */
fd_insert(cfd);
fdtab[cfd].owner = &s->si[0].conn;
- fdtab[cfd].flags = 0;
fdtab[cfd].iocb = conn_fd_handler;
conn_data_want_recv(&s->si[0].conn);
if (conn_data_init(&s->si[0].conn) < 0)