]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: add a new list member in the connection struct
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Aug 2015 15:25:58 +0000 (17:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 Aug 2015 09:00:34 +0000 (11:00 +0200)
This list member will be used to attach a connection to a list of
idle, reusable or queued connections. It's unused for now. Given
that it's not expected to be used more than a few times per session,
the member was put after the target, in the area starting at the
second cache line of the structure.

include/proto/connection.h
include/types/connection.h

index 2fb25cc29fbef6a311ebb2ea60e6ec2b7c02b005..952f9ea2f54034c90842d34a11b008442b93aee7 100644 (file)
@@ -481,6 +481,7 @@ static inline void conn_init(struct connection *conn)
        conn->err_code = CO_ER_NONE;
        conn->target = NULL;
        conn->proxy_netns = NULL;
+       LIST_INIT(&conn->list);
 }
 
 /* Tries to allocate a new connection and initialized its main fields. The
index 4c610969eaef96abd03eaf5fdd45238494cfb429..8192ef5a640195b8f77c6ba292f1b96dcb8568e5 100644 (file)
@@ -261,6 +261,7 @@ struct connection {
                } sock;
        } t;
        enum obj_type *target;        /* the target to connect to (server, proxy, applet, ...) */
+       struct list list;             /* attach point to various connection lists (idle, ...) */
        const struct netns_entry *proxy_netns;
        struct {
                struct sockaddr_storage from;   /* client address, or address to spoof when connecting to the server */