MINOR: quic: define quic_tune

Define a new structure quic_tune. It will be useful to regroup various
configuration settings and tunable related to QUIC, instead of defining
them into the global structure.
This commit is contained in:
Amaury Denoyelle 2025-01-30 17:58:20 +01:00
parent 2fc63cb186
commit 09e9c7d5b7
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,15 @@
#ifndef _HAPROXY_QUIC_TUNE_T_H
#define _HAPROXY_QUIC_TUNE_T_H
#ifdef USE_QUIC
#ifndef USE_OPENSSL
#error "Must define USE_OPENSSL"
#endif
struct quic_tune {
uint options;
};
#endif /* USE_QUIC */
#endif /* _HAPROXY_QUIC_TUNE_T_H */

View File

@ -0,0 +1,15 @@
#ifndef _HAPROXY_QUIC_TUNE_H
#define _HAPROXY_QUIC_TUNE_H
#ifdef USE_QUIC
#ifndef USE_OPENSSL
#error "Must define USE_OPENSSL"
#endif
#include <haproxy/quic_tune-t.h>
extern struct quic_tune quic_tune;
#endif /* USE_QUIC */
#endif /* _HAPROXY_QUIC_TUNE_H */

View File

@ -15,6 +15,7 @@
#include <haproxy/proxy.h>
#include <haproxy/quic_cc.h>
#include <haproxy/quic_rules.h>
#include <haproxy/quic_tune.h>
#include <haproxy/tools.h>
#define QUIC_CC_NEWRENO_STR "newreno"
@ -22,6 +23,8 @@
#define QUIC_CC_BBR_STR "bbr"
#define QUIC_CC_NO_CC_STR "nocc"
struct quic_tune quic_tune;
static int bind_parse_quic_force_retry(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
conf->options |= BC_O_QUIC_FORCE_RETRY;