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)'"
This commit is contained in:
Christopher Faulet 2023-02-14 16:12:54 +01:00
parent d4eaa8af6b
commit 678a4ced70
3 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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 <unix_socket> get listening sockets from a unix socket\n"
" -S <bind>[,<bind options>...] 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')