mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 23:01:24 +02:00
MINOR: listener: move the backlog setting from listener to bind_conf
The backlog setting is also defined by the bind_conf, so let's move it there.
This commit is contained in:
parent
882f2485a1
commit
1920f897d8
@ -201,6 +201,7 @@ struct bind_conf {
|
|||||||
int maxseg; /* for TCP, advertised MSS */
|
int maxseg; /* for TCP, advertised MSS */
|
||||||
int tcp_ut; /* for TCP, user timeout */
|
int tcp_ut; /* for TCP, user timeout */
|
||||||
int maxaccept; /* if set, max number of connections accepted at once (-1 when disabled) */
|
int maxaccept; /* if set, max number of connections accepted at once (-1 when disabled) */
|
||||||
|
unsigned int backlog; /* if set, listen backlog */
|
||||||
int level; /* stats access level (ACCESS_LVL_*) */
|
int level; /* stats access level (ACCESS_LVL_*) */
|
||||||
int severity_output; /* default severity output format in cli feedback messages */
|
int severity_output; /* default severity output format in cli feedback messages */
|
||||||
struct list listeners; /* list of listeners using this bind config */
|
struct list listeners; /* list of listeners using this bind config */
|
||||||
@ -243,7 +244,6 @@ struct listener {
|
|||||||
struct fe_counters *counters; /* statistics counters */
|
struct fe_counters *counters; /* statistics counters */
|
||||||
int nbconn; /* current number of connections on this listener */
|
int nbconn; /* current number of connections on this listener */
|
||||||
int maxconn; /* maximum connections allowed on this listener */
|
int maxconn; /* maximum connections allowed on this listener */
|
||||||
unsigned int backlog; /* if set, listen backlog */
|
|
||||||
int (*accept)(struct connection *conn); /* upper layer's accept() */
|
int (*accept)(struct connection *conn); /* upper layer's accept() */
|
||||||
enum obj_type *default_target; /* default target to use for accepted sessions or NULL */
|
enum obj_type *default_target; /* default target to use for accepted sessions or NULL */
|
||||||
/* cache line boundary */
|
/* cache line boundary */
|
||||||
|
@ -810,8 +810,8 @@ void delete_listener(struct listener *listener)
|
|||||||
*/
|
*/
|
||||||
int listener_backlog(const struct listener *l)
|
int listener_backlog(const struct listener *l)
|
||||||
{
|
{
|
||||||
if (l->backlog)
|
if (l->bind_conf->backlog)
|
||||||
return l->backlog;
|
return l->bind_conf->backlog;
|
||||||
|
|
||||||
if (l->bind_conf->frontend->backlog)
|
if (l->bind_conf->frontend->backlog)
|
||||||
return l->bind_conf->frontend->backlog;
|
return l->bind_conf->frontend->backlog;
|
||||||
@ -1540,7 +1540,6 @@ static int bind_parse_accept_netscaler_cip(char **args, int cur_arg, struct prox
|
|||||||
/* parse the "backlog" bind keyword */
|
/* parse the "backlog" bind keyword */
|
||||||
static int bind_parse_backlog(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
|
static int bind_parse_backlog(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
|
||||||
{
|
{
|
||||||
struct listener *l;
|
|
||||||
int val;
|
int val;
|
||||||
|
|
||||||
if (!*args[cur_arg + 1]) {
|
if (!*args[cur_arg + 1]) {
|
||||||
@ -1554,9 +1553,7 @@ static int bind_parse_backlog(char **args, int cur_arg, struct proxy *px, struct
|
|||||||
return ERR_ALERT | ERR_FATAL;
|
return ERR_ALERT | ERR_FATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
list_for_each_entry(l, &conf->listeners, by_bind)
|
conf->backlog = val;
|
||||||
l->backlog = val;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user