mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-08 08:07:10 +02:00
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.
This commit is contained in:
parent
600802aef0
commit
d75d40e9a8
@ -481,6 +481,7 @@ static inline void conn_init(struct connection *conn)
|
|||||||
conn->err_code = CO_ER_NONE;
|
conn->err_code = CO_ER_NONE;
|
||||||
conn->target = NULL;
|
conn->target = NULL;
|
||||||
conn->proxy_netns = NULL;
|
conn->proxy_netns = NULL;
|
||||||
|
LIST_INIT(&conn->list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tries to allocate a new connection and initialized its main fields. The
|
/* Tries to allocate a new connection and initialized its main fields. The
|
||||||
|
@ -261,6 +261,7 @@ struct connection {
|
|||||||
} sock;
|
} sock;
|
||||||
} t;
|
} t;
|
||||||
enum obj_type *target; /* the target to connect to (server, proxy, applet, ...) */
|
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;
|
const struct netns_entry *proxy_netns;
|
||||||
struct {
|
struct {
|
||||||
struct sockaddr_storage from; /* client address, or address to spoof when connecting to the server */
|
struct sockaddr_storage from; /* client address, or address to spoof when connecting to the server */
|
||||||
|
Loading…
Reference in New Issue
Block a user