From: Christopher Faulet Date: Tue, 14 Feb 2023 15:12:54 +0000 (+0100) Subject: MINOR: haproxy: Add an command option to disable data fast-forward X-Git-Tag: v2.8-dev5~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=678a4ced70ce976d4f688612c0f2944ca26c25f4;p=thirdparty%2Fhaproxy.git MINOR: haproxy: Add an command option to disable data fast-forward The -dF option can now be used to disable data fast-forward. It does the same than the global option "tune.fast-forward off". Some reg-tests may rely on this optim. To detect the feature and skip such script, the following vtest command must be used: feature cmd "$HAPROXY_PROGRAM -cc '!(globa.tune & GTUNE_NO_FAST_FWD)'" --- diff --git a/doc/management.txt b/doc/management.txt index 2678fdf652..a56a9d5ea0 100644 --- a/doc/management.txt +++ b/doc/management.txt @@ -217,6 +217,13 @@ list of options is : suspicious configuration statements. This will never prevent startup even in "zero-warning" mode nor change the exit status code. + -dF : disable data fast-forward. It is a mechanism to optimize the data + forwarding by passing data directly from a side to the other one without + waking the stream up. Thanks to this directive, it is possible to disable + this optimization. Note it also disable any kernel tcp splicing. This + command is not meant for regular use, it will generally only be suggested by + developers along complex debugging sessions. + -dG : disable use of getaddrinfo() to resolve host names into addresses. It can be used when suspecting that getaddrinfo() doesn't work as expected. This option was made available because many bogus implementations of diff --git a/reg-tests/http-messaging/http_splicing.vtc b/reg-tests/http-messaging/http_splicing.vtc index 2456cdd2a9..c76ebf3160 100644 --- a/reg-tests/http-messaging/http_splicing.vtc +++ b/reg-tests/http-messaging/http_splicing.vtc @@ -4,6 +4,7 @@ varnishtest "A test to validate h1 splicing support" feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.6-dev0)'" feature cmd "$HAPROXY_PROGRAM -cc 'feature(LINUX_SPLICE)'" +feature cmd "$HAPROXY_PROGRAM -cc '!(globa.tune & GTUNE_NO_FAST_FWD)'" feature ignore_unknown_macro #REGTEST_TYPE=slow diff --git a/src/haproxy.c b/src/haproxy.c index 507a4aa45f..09e4198d7c 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -622,6 +622,7 @@ static void usage(char *name) " -dV disables SSL verify on servers side\n" " -dW fails if any warning is emitted\n" " -dD diagnostic mode : warn about suspicious configuration statements\n" + " -dF disable fast-forward\n" " -sf/-st [pid ]* finishes/terminates old pids.\n" " -x get listening sockets from a unix socket\n" " -S [,...] new master CLI\n" @@ -1647,6 +1648,8 @@ static void init_args(int argc, char **argv) else if (*flag == 'd' && flag[1] == 'R') global.tune.options &= ~GTUNE_USE_REUSEPORT; #endif + else if (*flag == 'd' && flag[1] == 'F') + global.tune.options |= GTUNE_NO_FAST_FWD; else if (*flag == 'd' && flag[1] == 'V') global.ssl_server_verify = SSL_SERVER_VERIFY_NONE; else if (*flag == 'V')