This is another bind line setting which can move to the bind_conf.
Note that it leaves a 2-byte hole in the listener struct.
int (*accept)(struct connection *conn); /* upper layer's accept() */
int level; /* stats access level (ACCESS_LVL_*) */
int severity_output; /* default severity output format in cli feedback messages */
+ short int nice; /* nice value to assign to the instantiated tasks */
+ /* 2-byte hole here */
struct list listeners; /* list of listeners using this bind config */
uint32_t ns_cip_magic; /* Excepted NetScaler Client IP magic number */
struct list by_fe; /* next binding for the same frontend, or NULL */
struct listener {
enum obj_type obj_type; /* object type = OBJ_TYPE_LISTENER */
enum li_state state; /* state: NEW, INIT, ASSIGNED, LISTEN, READY, FULL */
- short int nice; /* nice value to assign to the instantiated tasks */
+ /* 2-byte hole here */
int luid; /* listener universally unique ID, used for SNMP */
int options; /* socket options : LI_O_* */
int flags; /* LI_F_* flags */
}
bind_conf->accept = session_accept_fd;
+ bind_conf->nice = -64; /* we want to boost priority for local stats */
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
l->options |= LI_O_UNLIMITED; /* don't make the peers subject to global limits */
- l->nice = -64; /* we want to boost priority for local stats */
global.maxsock++; /* for the listening socket */
}
}
bind_conf->accept = session_accept_fd;
+ bind_conf->nice = -64; /* we want to boost priority for local stats */
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
/* don't make the peers subject to global limits and don't close it in the master */
l->options |= LI_O_UNLIMITED;
l->rx.flags |= RX_F_MWORKER; /* we are keeping this FD in the master */
- l->nice = -64; /* we want to boost priority for local stats */
global.maxsock++; /* for the listening socket */
}
global.maxsock += mworker_proxy->maxconn;
ha_free(&path);
bind_conf->accept = session_accept_fd;
+ bind_conf->nice = -64; /* we want to boost priority for local stats */
list_for_each_entry(l, &bind_conf->listeners, by_bind) {
l->options |= (LI_O_UNLIMITED | LI_O_NOSTOP);
HA_ATOMIC_INC(&unstoppable_jobs);
/* it's a sockpair but we don't want to keep the fd in the master */
l->rx.flags &= ~RX_F_INHERITED;
- l->nice = -64; /* we want to boost priority for local stats */
global.maxsock++; /* for the listening socket */
}
/* parse the "nice" bind keyword */
static int bind_parse_nice(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
- struct listener *l;
int val;
if (!*args[cur_arg + 1]) {
return ERR_ALERT | ERR_FATAL;
}
- list_for_each_entry(l, &conf->listeners, by_bind)
- l->nice = val;
-
+ conf->nice = val;
return 0;
}
goto out_free_sess;
sess->task->context = sess;
- sess->task->nice = l->nice;
+ sess->task->nice = l->bind_conf->nice;
sess->task->process = session_expire_embryonic;
sess->task->expire = tick_add_ifset(now_ms, p->timeout.client);
task_queue(sess->task);
t->context = s;
t->expire = TICK_ETERNITY;
if (sess->listener)
- t->nice = sess->listener->nice;
+ t->nice = sess->listener->bind_conf->nice;
/* Note: initially, the stream's backend points to the frontend.
* This changes later when switching rules are executed or