From: Willy Tarreau Date: Tue, 4 Aug 2015 15:25:58 +0000 (+0200) Subject: MINOR: connection: add a new list member in the connection struct X-Git-Tag: v1.6-dev4~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d75d40e9a8ef55a533742282854965b41f17ad3d;p=thirdparty%2Fhaproxy.git MINOR: connection: add a new list member in the connection struct 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. --- diff --git a/include/proto/connection.h b/include/proto/connection.h index 2fb25cc29f..952f9ea2f5 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -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 diff --git a/include/types/connection.h b/include/types/connection.h index 4c610969ea..8192ef5a64 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -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 */