]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: haproxy: Add an command option to disable data fast-forward
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 Feb 2023 15:12:54 +0000 (16:12 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 17 Feb 2023 09:17:02 +0000 (10:17 +0100)
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)'"

doc/management.txt
reg-tests/http-messaging/http_splicing.vtc
src/haproxy.c

index 2678fdf652624429f704c32428a2156e19c7d604..a56a9d5ea0d899bb4f2f141f5f710a1842da4afe 100644 (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
index 2456cdd2a98ffcd5fff6ca966cca383f9fb8dec9..c76ebf31602caf8dacef3187f3ec7aaadce07f4b 100644 (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
index 507a4aa45fb4560c04cc11239a5ada3a3323fd63..09e4198d7c82231f95f7b5920d764bc7463a1195 100644 (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')