A new global option was recently introduced to disable pacing. However,
the value used (1<<31) caused issue with some compiler as options field
used for storage is declared as int. Move pacing deactivation flag
outside into the newly defined quic_tune to fix this.
This should be backported up to 3.1 after a period of observation. Note
that it relied on the previous patch which defined new quic_tune type.
(cherry picked from commit
b849ee5fa35b7a909869db1dfd19f450f3172034)
[ada: patch was manually adapted since
a19d9b0486 ("MAJOR: quic: mark
pacing as stable and enable it by default") was not backported]
Signed-off-by: Aurelien DARRAGON <adarragon@haproxy.com>
#define GTUNE_LISTENER_MQ_ANY (GTUNE_LISTENER_MQ_FAIR | GTUNE_LISTENER_MQ_OPT)
#define GTUNE_QUIC_CC_HYSTART (1<<29)
#define GTUNE_QUIC_NO_UDP_GSO (1<<30)
-#define GTUNE_QUIC_NO_PACING (1<<31)
#define NO_ZERO_COPY_FWD 0x0001 /* Globally disable zero-copy FF */
#define NO_ZERO_COPY_FWD_PT 0x0002 /* disable zero-copy FF for PT (recv & send are disabled automatically) */
#error "Must define USE_OPENSSL"
#endif
+#define QUIC_TUNE_NO_PACING 0x00000001
+
struct quic_tune {
uint options;
};
"'expose-experimental-directives'\n", args[0]);
return -1;
}
- global.tune.options &= ~GTUNE_QUIC_NO_PACING;
+ quic_tune.options &= ~QUIC_TUNE_NO_PACING;
}
else
- global.tune.options |= GTUNE_QUIC_NO_PACING;
+ quic_tune.options |= QUIC_TUNE_NO_PACING;
}
return 0;
#include <haproxy/namespace.h>
#include <haproxy/quic_cc-t.h>
#include <haproxy/quic_sock.h>
+#include <haproxy/quic_tune.h>
#include <haproxy/obj_type-t.h>
#include <haproxy/openssl-compat.h>
#include <haproxy/peers-t.h>
bind_conf->quic_cc_algo : default_quic_cc_algo;
if (!(cc_algo->flags & QUIC_CC_ALGO_FL_OPT_PACING) &&
- global.tune.options & GTUNE_QUIC_NO_PACING) {
+ quic_tune.options & QUIC_TUNE_NO_PACING) {
ha_warning("Binding [%s:%d] for %s %s: using the selected congestion algorithm without pacing may cause slowdowns or high loss rates during transfers.\n",
bind_conf->file, bind_conf->line,
proxy_type_str(curproxy), curproxy->id);
#include <haproxy/proto_sockpair.h>
#include <haproxy/proto_tcp.h>
#include <haproxy/proxy.h>
+#include <haproxy/quic_tune.h>
#include <haproxy/regex.h>
#include <haproxy/sample.h>
#include <haproxy/server.h>
#endif
#ifdef USE_QUIC
global.tune.options |= GTUNE_QUIC_SOCK_PER_CONN;
- global.tune.options |= GTUNE_QUIC_NO_PACING;
+ quic_tune.options |= QUIC_TUNE_NO_PACING;
#endif
global.tune.options |= GTUNE_STRICT_LIMITS;
#include <haproxy/quic_sock.h>
#include <haproxy/quic_stream.h>
#include <haproxy/quic_tp-t.h>
+#include <haproxy/quic_tune.h>
#include <haproxy/quic_tx.h>
#include <haproxy/session.h>
#include <haproxy/ssl_sock-t.h>
/* Returns true if pacing should be used for <conn> connection. */
static int qcc_is_pacing_active(const struct connection *conn)
{
- return !(global.tune.options & GTUNE_QUIC_NO_PACING);
+ return !(quic_tune.options & QUIC_TUNE_NO_PACING);
}
static void qcs_free_ncbuf(struct qcs *qcs, struct ncbuf *ncbuf)