]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: define quic_pacing module
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 24 Oct 2024 13:53:17 +0000 (15:53 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 19 Nov 2024 15:16:48 +0000 (16:16 +0100)
Add a new module quic_pacing. A new structure quic_pacer is defined.
This will be used as a pacing engine to implement smooth emission of
QUIC data.

Makefile
include/haproxy/quic_conn.h
include/haproxy/quic_pacing-t.h [new file with mode: 0644]
include/haproxy/quic_pacing.h [new file with mode: 0644]
src/quic_pacing.c [new file with mode: 0644]

index 5ace584836b1f3f92582517be8278bf5e6310d8c..4a8066daa03002f423ab12d098d15e3bf486026b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -653,7 +653,7 @@ OPTIONS_OBJS += src/quic_rx.o src/mux_quic.o src/h3.o src/quic_tx.o \
                 src/cfgparse-quic.o src/qmux_trace.o src/qpack-enc.o   \
                 src/qpack-tbl.o src/h3_stats.o src/quic_stats.o                \
                 src/quic_fctl.o src/cbuf.o src/quic_rules.o         \
-                src/quic_token.o
+                src/quic_token.o src/quic_pacing.o
 endif
 
 ifneq ($(USE_QUIC_OPENSSL_COMPAT:0=),)
index ebff2918641bb61851a3552f6b966ee6ad01d2bb..31f0c086f88428908303a97ad172c1f2c163eaee 100644 (file)
@@ -45,6 +45,7 @@
 #include <haproxy/quic_enc.h>
 #include <haproxy/quic_frame.h>
 #include <haproxy/quic_loss.h>
+#include <haproxy/quic_pacing.h>
 #include <haproxy/quic_rx.h>
 #include <haproxy/mux_quic.h>
 
diff --git a/include/haproxy/quic_pacing-t.h b/include/haproxy/quic_pacing-t.h
new file mode 100644 (file)
index 0000000..2315c2f
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef _HAPROXY_QUIC_PACING_T_H
+#define _HAPROXY_QUIC_PACING_T_H
+
+#include <haproxy/api-t.h>
+#include <haproxy/quic_cc-t.h>
+
+struct quic_pacer {
+       const struct quic_cc *cc; /* Congestion controler algo used for this connection */
+};
+
+#endif /* _HAPROXY_QUIC_PACING_T_H */
diff --git a/include/haproxy/quic_pacing.h b/include/haproxy/quic_pacing.h
new file mode 100644 (file)
index 0000000..5ef11a5
--- /dev/null
@@ -0,0 +1,15 @@
+#ifndef _HAPROXY_QUIC_PACING_H
+#define _HAPROXY_QUIC_PACING_H
+
+#include <haproxy/quic_pacing-t.h>
+
+#include <haproxy/list.h>
+#include <haproxy/quic_frame.h>
+
+static inline void quic_pacing_init(struct quic_pacer *pacer,
+                                    const struct quic_cc *cc)
+{
+       pacer->cc = cc;
+}
+
+#endif /* _HAPROXY_QUIC_PACING_H */
diff --git a/src/quic_pacing.c b/src/quic_pacing.c
new file mode 100644 (file)
index 0000000..faee5e8
--- /dev/null
@@ -0,0 +1 @@
+#include <haproxy/quic_pacing.h>