mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-17 17:04:35 +00:00
MINOR: config: Deprecate and ignore tune.chksize global option
This option is now ignored because I/O check buffers are now allocated using the buffer pool. Thus, it is marked as deprecated in the documentation and ignored during the configuration parsing. The field is also removed from the global structure. Because this option is ignored since a recent fix, backported as fare as 2.2, this patch should be backported too. Especially because it updates the documentation.
This commit is contained in:
parent
b1bb069c15
commit
bb9fb8b7f8
@ -2146,12 +2146,8 @@ tune.bufsize <number>
|
||||
value set using this parameter will automatically be rounded up to the next
|
||||
multiple of 8 on 32-bit machines and 16 on 64-bit machines.
|
||||
|
||||
tune.chksize <number>
|
||||
Sets the check buffer size to this size (in bytes). Higher values may help
|
||||
find string or regex patterns in very large pages, though doing so may imply
|
||||
more memory and CPU usage. The default value is 16384 and can be changed at
|
||||
build time. It is not recommended to change this value, but to use better
|
||||
checks whenever possible.
|
||||
tune.chksize <number> (deprecated)
|
||||
This option is deprecated and ignored.
|
||||
|
||||
tune.comp.maxlevel <number>
|
||||
Sets the maximum compression level. The compression level affects CPU
|
||||
@ -5283,7 +5279,7 @@ http-check expect [min-recv <int>] [comment <msg>]
|
||||
considered invalid if the body contains the string.
|
||||
|
||||
It is important to note that the responses will be limited to a certain size
|
||||
defined by the global "tune.chksize" option, which defaults to 16384 bytes.
|
||||
defined by the global "tune.bufsize" option, which defaults to 16384 bytes.
|
||||
Thus, too large responses may not contain the mandatory pattern when using
|
||||
"string" or "rstring". If a large response is absolutely required, it is
|
||||
possible to change the default max size by setting the global variable.
|
||||
@ -11146,7 +11142,7 @@ tcp-check expect [min-recv <int>] [comment <msg>]
|
||||
buffer.
|
||||
|
||||
It is important to note that the responses will be limited to a certain size
|
||||
defined by the global "tune.chksize" option, which defaults to 16384 bytes.
|
||||
defined by the global "tune.bufsize" option, which defaults to 16384 bytes.
|
||||
Thus, too large responses may not contain the mandatory pattern when using
|
||||
"string", "rstring" or binary. If a large response is absolutely required, it
|
||||
is possible to change the default max size by setting the global variable.
|
||||
@ -11177,7 +11173,7 @@ tcp-check expect [min-recv <int>] [comment <msg>]
|
||||
|
||||
|
||||
See also : "option tcp-check", "tcp-check connect", "tcp-check send",
|
||||
"tcp-check send-binary", "http-check expect", tune.chksize
|
||||
"tcp-check send-binary", "http-check expect", tune.bufsize
|
||||
|
||||
|
||||
tcp-check send <data> [comment <msg>]
|
||||
@ -11203,7 +11199,7 @@ tcp-check send-lf <fmt> [comment <msg>]
|
||||
tcp-check expect string role:master
|
||||
|
||||
See also : "option tcp-check", "tcp-check connect", "tcp-check expect",
|
||||
"tcp-check send-binary", tune.chksize
|
||||
"tcp-check send-binary", tune.bufsize
|
||||
|
||||
|
||||
tcp-check send-binary <hexstring> [comment <msg>]
|
||||
@ -11231,7 +11227,7 @@ tcp-check send-binary-lf <hexfmt> [comment <msg>]
|
||||
|
||||
|
||||
See also : "option tcp-check", "tcp-check connect", "tcp-check expect",
|
||||
"tcp-check send", tune.chksize
|
||||
"tcp-check send", tune.bufsize
|
||||
|
||||
|
||||
tcp-check set-var(<var-name>) <expr>
|
||||
|
@ -151,7 +151,6 @@ struct global {
|
||||
int client_rcvbuf; /* set client rcvbuf to this value if not null */
|
||||
int server_sndbuf; /* set server sndbuf to this value if not null */
|
||||
int server_rcvbuf; /* set server rcvbuf to this value if not null */
|
||||
int chksize; /* check buffer size in bytes, defaults to BUFSIZE */
|
||||
int pipesize; /* pipe size in bytes, system defaults if zero */
|
||||
int max_http_hdr; /* max number of HTTP headers, use MAX_HTTP_HDR if zero */
|
||||
int requri_len; /* max len of request URI, use REQURI_LEN if zero */
|
||||
|
@ -190,14 +190,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
|
||||
global.tune.maxaccept = max;
|
||||
}
|
||||
else if (!strcmp(args[0], "tune.chksize")) {
|
||||
if (alertif_too_many_args(1, file, linenum, args, &err_code))
|
||||
goto out;
|
||||
if (*(args[1]) == 0) {
|
||||
ha_alert("parsing [%s:%d] : '%s' expects an integer argument.\n", file, linenum, args[0]);
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
}
|
||||
global.tune.chksize = atol(args[1]);
|
||||
/* Deprecated now */
|
||||
}
|
||||
else if (!strcmp(args[0], "tune.recv_enough")) {
|
||||
if (alertif_too_many_args(1, file, linenum, args, &err_code))
|
||||
|
@ -164,7 +164,6 @@ struct global global = {
|
||||
.options = GTUNE_LISTENER_MQ,
|
||||
.bufsize = (BUFSIZE + 2*sizeof(void *) - 1) & -(2*sizeof(void *)),
|
||||
.maxrewrite = MAXREWRITE,
|
||||
.chksize = (BUFSIZE + 2*sizeof(void *) - 1) & -(2*sizeof(void *)),
|
||||
.reserved_bufs = RESERVED_BUFS,
|
||||
.pattern_cache = DEFAULT_PAT_LRU_SIZE,
|
||||
.pool_low_ratio = 20,
|
||||
|
@ -976,14 +976,13 @@ smp_fetch_payload_lv(const struct arg *arg_p, struct sample *smp, const char *kw
|
||||
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
|
||||
head = ci_head(chn);
|
||||
data = ci_data(chn);
|
||||
max = global.tune.bufsize;
|
||||
}
|
||||
else if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK) {
|
||||
struct buffer *buf = &(__objt_check(smp->sess->origin)->bi);
|
||||
head = b_head(buf);
|
||||
data = b_data(buf);
|
||||
max = global.tune.chksize;
|
||||
}
|
||||
max = global.tune.bufsize;
|
||||
if (!head)
|
||||
return 0;
|
||||
|
||||
@ -1039,14 +1038,13 @@ smp_fetch_payload(const struct arg *arg_p, struct sample *smp, const char *kw, v
|
||||
chn = ((smp->opt & SMP_OPT_DIR) == SMP_OPT_DIR_RES) ? &smp->strm->res : &smp->strm->req;
|
||||
head = ci_head(chn);
|
||||
data = ci_data(chn);
|
||||
max = global.tune.bufsize;
|
||||
}
|
||||
else if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK) {
|
||||
struct buffer *buf = &(__objt_check(smp->sess->origin)->bi);
|
||||
head = b_head(buf);
|
||||
data = b_data(buf);
|
||||
max = global.tune.chksize;
|
||||
}
|
||||
max = global.tune.bufsize;
|
||||
if (!head)
|
||||
return 0;
|
||||
|
||||
|
@ -2737,7 +2737,7 @@ struct tcpcheck_rule *parse_tcpcheck_expect(char **args, int cur_arg, struct pro
|
||||
memprintf(errmsg, "'%s' expects a integer as argument", args[cur_arg]);
|
||||
goto error;
|
||||
}
|
||||
/* Use an signed integer here because of chksize */
|
||||
/* Use an signed integer here because of bufsize */
|
||||
cur_arg++;
|
||||
min_recv = atol(args[cur_arg]);
|
||||
if (min_recv < -1 || min_recv > INT_MAX) {
|
||||
|
Loading…
Reference in New Issue
Block a user