From: Willy Tarreau Date: Fri, 19 Jun 2020 14:20:59 +0000 (+0200) Subject: BUG/MAJOR: init: properly compute the default global.maxpipes value X-Git-Tag: v2.2-dev10~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4818db0a93b78b98fb15d38208e3974bac08cd9;p=thirdparty%2Fhaproxy.git BUG/MAJOR: init: properly compute the default global.maxpipes value Initial default settings for maxconn/maxsock/maxpipes were rearranged in commit a409f30d0 ("MINOR: init: move the maxsock calculation code to compute_ideal_maxsock()") but as a side effect, the calculated maxpipes value was not stored anymore into global.maxpipes. This resulted in splicing being disabled unless there is an explicit maxpipes setting in the global section. This patch just stores the calculated ideal value as planned in the computation and as was done before the patch above. This is strictly 2.2, no backport is needed. --- diff --git a/src/haproxy.c b/src/haproxy.c index 8f5048636e..802a88fbe6 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -2421,6 +2421,8 @@ static void init(int argc, char **argv) global.maxsock = compute_ideal_maxsock(global.maxconn); global.hardmaxconn = global.maxconn; + if (!global.maxpipes) + global.maxpipes = compute_ideal_maxpipes(); /* update connection pool thresholds */ global.tune.pool_low_count = ((long long)global.maxsock * global.tune.pool_low_ratio + 99) / 100;