- tune.pipesize
- tune.pool-high-fd-ratio
- tune.pool-low-fd-ratio
+ - tune.pt.zero-copy-forwarding
- tune.quic.frontend.conn-tx-buffers.limit
- tune.quic.frontend.max-idle-timeout
- tune.quic.frontend.max-streams-bidi
Thanks to this directive, it is possible to disable this optimization. Note
it also disable any kernel tcp splicing.
+ See also: tune.pt.zero-copy-forwarding
+
tune.events.max-events-at-once <number>
Sets the number of events that may be processed at once by an asynchronous
task handler (from event_hdl API). <number> should be included between 1
use before we stop putting connection into the idle pool for reuse. The
default is 20.
+tune.pt.zero-copy-forwarding { on | off }
+ Enables ('on') of disabled ('off') the zero-copy forwarding of data for the
+ pass-through multiplexer. To be used, the kernel splicing must also be
+ configured. It is enabled by default.
+
+ See also: tune.disable-zero-copy-forwarding, option splice-auto,
+ option splice-request and option splice-response
+
tune.quic.frontend.conn-tx-buffers.limit <number>
This settings defines the maximum number of buffers allocated for a QUIC
connection on data emission. By default, it is set to 30. QUIC buffers are
#include <haproxy/api.h>
#include <haproxy/buf.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/pipe.h>
#include <haproxy/stconn.h>
TRACE_ENTER(PT_EV_RX_DATA, conn, sc, 0, (size_t[]){count});
+ if (global.tune.no_zero_copy_fwd & NO_ZERO_COPY_FWD_PT) {
+ se_fl_clr(ctx->sd, SE_FL_MAY_FASTFWD);
+ goto end;
+ }
+
se_fl_clr(ctx->sd, SE_FL_RCV_MORE | SE_FL_WANT_ROOM);
conn->flags &= ~CO_FL_WAIT_ROOM;
sdo = mux_pt_opposite_sd(ctx);
}
}
+/* config parser for global "tune.pt.zero-copy-forwarding" */
+static int cfg_parse_pt_zero_copy_fwd(char **args, int section_type, struct proxy *curpx,
+ const struct proxy *defpx, const char *file, int line,
+ char **err)
+{
+ if (too_many_args(1, args, err, NULL))
+ return -1;
+
+ if (strcmp(args[1], "on") == 0)
+ global.tune.no_zero_copy_fwd &= ~NO_ZERO_COPY_FWD_PT;
+ else if (strcmp(args[1], "off") == 0)
+ global.tune.no_zero_copy_fwd |= NO_ZERO_COPY_FWD_PT;
+ else {
+ memprintf(err, "'%s' expects 'on' or 'off'.", args[0]);
+ return -1;
+ }
+ return 0;
+}
+
+
+/* config keyword parsers */
+static struct cfg_kw_list cfg_kws = {ILH, {
+ { CFG_GLOBAL, "tune.pt.zero-copy-forwarding", cfg_parse_pt_zero_copy_fwd },
+ { 0, NULL, NULL }
+}};
+
+INITCALL1(STG_REGISTER, cfg_register_keywords, &cfg_kws);
+
+
/* The mux operations */
const struct mux_ops mux_tcp_ops = {
.init = mux_pt_init,