]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic: fix headers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 30 Sep 2022 15:44:15 +0000 (17:44 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 3 Oct 2022 14:25:17 +0000 (16:25 +0200)
Clean up quic sources by adjusting headers list included depending
on the actual dependency of each source file.

On some occasion, xprt_quic.h was removed from included list. This is
useful to help reducing the dependency on this single file and cleaning
up QUIC haproxy architecture.

This should be backported up to 2.6.

18 files changed:
include/haproxy/listener-t.h
include/haproxy/mux_quic.h
include/haproxy/quic_cc.h
include/haproxy/quic_tls.h
include/haproxy/server-t.h
src/cfgparse.c
src/h3.c
src/proto_quic.c
src/qmux_trace.c
src/quic_cc.c
src/quic_cc_newreno.c
src/quic_frame.c
src/quic_loss.c
src/quic_sock.c
src/quic_stats.c
src/quic_stream.c
src/quic_tls.c
src/quic_tp.c

index c8e4b74c0a651adef5ff3ff1920c9c731c20a01a..17f3251b6a658fbe4d915cd29e82c1caae56e989 100644 (file)
 
 #include <haproxy/api-t.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/quic_cc-t.h>
+#include <haproxy/quic_tp-t.h>
 #include <haproxy/receiver-t.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/thread.h>
 
-#include <haproxy/xprt_quic-t.h>
-
 /* Some pointer types reference below */
 struct task;
 struct protocol;
index 7d3e47eed0ac3f830ff23d5d83d74f9b6e8876e6..14de1e0618c812864d975d28d981e6de9802a30a 100644 (file)
@@ -6,13 +6,11 @@
 #error "Must define USE_OPENSSL"
 #endif
 
-#include <import/eb64tree.h>
-
 #include <haproxy/api.h>
 #include <haproxy/connection.h>
+#include <haproxy/list.h>
 #include <haproxy/mux_quic-t.h>
 #include <haproxy/stream.h>
-#include <haproxy/xprt_quic-t.h>
 
 struct qcs *qcc_init_stream_local(struct qcc *qcc, int bidi);
 struct buffer *qc_get_buf(struct qcs *qcs, struct buffer *bptr);
index be92336d8ad53af667833c3e945d366ab349de25..7bc0d6a2a69148b5096b72b7ca223ef23fdb9bd0 100644 (file)
@@ -27,6 +27,7 @@
 #endif
 
 #include <haproxy/api.h>
+#include <haproxy/buf.h>
 #include <haproxy/chunk.h>
 #include <haproxy/quic_cc-t.h>
 #include <haproxy/xprt_quic-t.h>
index 40458961e4e7989f17a154b8ef0ac4bd47db39a6..afe193dfb74b888f29a3f9a7dc8752856fd601b6 100644 (file)
 #define TRACE_SOURCE &trace_quic
 
 #include <stdlib.h>
+#include <string.h>
 #include <openssl/ssl.h>
 
 #include <haproxy/dynbuf.h>
+#include <haproxy/pool.h>
 #include <haproxy/quic_tls-t.h>
 #include <haproxy/trace.h>
 #include <haproxy/xprt_quic.h>
index 88302ca269a61b6fdbb5aa5e5ce7f858001d80c0..ac287dfe3f81c68f2eb2488623447039b5e17306 100644 (file)
 #include <haproxy/listener-t.h>
 #include <haproxy/obj_type-t.h>
 #include <haproxy/queue-t.h>
+#include <haproxy/quic_tp-t.h>
 #include <haproxy/resolvers-t.h>
 #include <haproxy/stats-t.h>
 #include <haproxy/task-t.h>
 #include <haproxy/thread-t.h>
-#include <haproxy/xprt_quic-t.h>
 
 
 /* server states. Only SRV_ST_STOPPED indicates a down server. */
index 0c865c893e0ee3dd859faf2ad399255e799fc732..0cf0485411d4c8781ff69421b3fc6aa32bfae06e 100644 (file)
@@ -89,7 +89,6 @@
 #include <haproxy/thread.h>
 #include <haproxy/tools.h>
 #include <haproxy/uri_auth-t.h>
-#include <haproxy/xprt_quic.h>
 
 
 /* Used to chain configuration sections definitions. This list
index b8a8f3639b44e62024ae19024decf8cc99641375..fe3d15e21bc9239109a3fdf66478ab7b23517b5d 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <import/ist.h>
+
+#include <haproxy/api.h>
 #include <haproxy/buf.h>
+#include <haproxy/chunk.h>
 #include <haproxy/connection.h>
 #include <haproxy/dynbuf.h>
 #include <haproxy/h3.h>
 #include <haproxy/h3_stats.h>
 #include <haproxy/http.h>
+#include <haproxy/http-hdr-t.h>
 #include <haproxy/http_htx.h>
 #include <haproxy/htx.h>
 #include <haproxy/intops.h>
@@ -31,6 +36,7 @@
 #include <haproxy/qpack-dec.h>
 #include <haproxy/qpack-enc.h>
 #include <haproxy/quic_enc.h>
+#include <haproxy/stats-t.h>
 #include <haproxy/tools.h>
 #include <haproxy/trace.h>
 #include <haproxy/xprt_quic.h>
@@ -1175,6 +1181,7 @@ static int h3_init(struct qcc *qcc)
        h3c->id_goaway = 0;
 
        qcc->ctx = h3c;
+       /* TODO cleanup only ref to quic_conn */
        h3c->prx_counters =
                EXTRA_COUNTERS_GET(qc->li->bind_conf->frontend->extra_counters_fe,
                                   &h3_stats_module);
index 20323730182f0c471c65aa0ff9e48ffdc11fdd06..78a235a347053ff3a804d7dba14bbf752f5d89df 100644 (file)
@@ -24,6 +24,8 @@
 #include <netinet/udp.h>
 #include <netinet/in.h>
 
+#include <import/ebtree-t.h>
+
 #include <haproxy/api.h>
 #include <haproxy/arg.h>
 #include <haproxy/cbuf.h>
 #include <haproxy/proto_quic.h>
 #include <haproxy/proto_udp.h>
 #include <haproxy/proxy-t.h>
-#include <haproxy/sock.h>
 #include <haproxy/quic_sock.h>
+#include <haproxy/sock.h>
 #include <haproxy/sock_inet.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/xprt_quic.h>
 
index 72a8f1b2fb1ce618274fe9bbf6f96b854ac54346..7899bff668325349311d33d0a8430d763bd68f9a 100644 (file)
@@ -5,6 +5,7 @@
 #include <haproxy/connection.h>
 #include <haproxy/chunk.h>
 #include <haproxy/mux_quic.h>
+#include <haproxy/quic_frame-t.h>
 
 /* trace source and events */
 static void qmux_trace(enum trace_level level, uint64_t mask,
index 16555e008212ac9da6395a12da1c017bcdd2db06..8fd99d3c1989b6994fe7fc278bdb552a169c319b 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <haproxy/buf.h>
-#include <haproxy/quic_cc-t.h>
-#include <haproxy/xprt_quic-t.h>
-
+#include <haproxy/quic_cc.h>
 
 struct quic_cc_algo *default_quic_cc_algo = &quic_cc_algo_cubic;
 
index 89a0524a89cf2f478ffedae3aead3873ffa158ef..1fd92a5e34e98e0abcf3906b23f2972085886fa7 100644 (file)
@@ -20,6 +20,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <haproxy/api-t.h>
+#include <haproxy/buf.h>
+#include <haproxy/chunk.h>
 #include <haproxy/quic_cc.h>
 #include <haproxy/trace.h>
 #include <haproxy/xprt_quic.h>
index 58e9ebcdcf567fad23e0d76449bcb7134d004ca0..cc4039ef4bee344ccf0558077ccbfa1d766e580a 100644 (file)
@@ -7,8 +7,12 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <string.h>
+
 #include <import/eb64tree.h>
+#include <haproxy/quic_enc.h>
 #include <haproxy/quic_frame.h>
+#include <haproxy/quic_tp-t.h>
 #include <haproxy/trace.h>
 #include <haproxy/xprt_quic.h>
 
index 57a602175c20cb655b72288325c2487b46e39a78..6f454f46f2f2e1a4e26a0abee12d1698d2fd2985 100644 (file)
@@ -4,6 +4,7 @@
 #include <haproxy/xprt_quic-t.h>
 
 #include <haproxy/atomic.h>
+#include <haproxy/list.h>
 #include <haproxy/ticks.h>
 #include <haproxy/trace.h>
 
index 1fabc1b003a7648740163a0d7e6fd88ce93daaa0..26fb1e33d51b7a4c7462931efa559386f744c9be 100644 (file)
  */
 
 #include <errno.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include <sys/socket.h>
 #include <sys/types.h>
 
+#include <haproxy/api.h>
+#include <haproxy/buf.h>
 #include <haproxy/connection.h>
+#include <haproxy/fd.h>
+#include <haproxy/freq_ctr.h>
+#include <haproxy/global-t.h>
+#include <haproxy/list.h>
 #include <haproxy/listener.h>
+#include <haproxy/pool.h>
 #include <haproxy/proto_quic.h>
+#include <haproxy/proxy-t.h>
 #include <haproxy/quic_sock.h>
+#include <haproxy/quic_tp-t.h>
 #include <haproxy/session.h>
+#include <haproxy/stats-t.h>
+#include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/xprt_quic.h>
 
index 529e245da8999934694cb5fabf0abdf4ea9a4e55..c81712918db1bf164301c6aee72831e43dc712f5 100644 (file)
@@ -1,3 +1,4 @@
+#include <haproxy/quic_frame-t.h>
 #include <haproxy/quic_stats-t.h>
 #include <haproxy/stats.h>
 
index abd977c5bf67e39f709da79095e5f3df4f47bd1b..255796b4ea041c6238dd20c0b994db31b3f90412 100644 (file)
@@ -4,9 +4,11 @@
 
 #include <haproxy/api.h>
 #include <haproxy/buf.h>
-#include <haproxy/list.h>
 #include <haproxy/dynbuf.h>
+#include <haproxy/list.h>
+#include <haproxy/mux_quic-t.h>
 #include <haproxy/pool.h>
+#include <haproxy/task.h>
 #include <haproxy/xprt_quic.h>
 
 DECLARE_STATIC_POOL(pool_head_quic_stream_desc, "qc_stream_desc",
index 28c7d755f8ba160625646f794a1df5bd04abd854..069aa41fdbc59b3beff9ab2a7611269f5e116a7d 100644 (file)
@@ -2,13 +2,13 @@
 
 #include <string.h>
 
-#include <openssl/ssl.h>
-
 #include <openssl/evp.h>
 #include <openssl/kdf.h>
+#include <openssl/ssl.h>
 
 #include <haproxy/buf.h>
 #include <haproxy/chunk.h>
+#include <haproxy/pool.h>
 #include <haproxy/xprt_quic.h>
 
 
index ca77289e3bd082fdaff5bc4524767e919a05ca81..b51ab3f96ceb1eee7f34ee27ae76df2514c673a2 100644 (file)
@@ -1,3 +1,6 @@
+#include <arpa/inet.h>
+#include <string.h>
+
 #include <haproxy/global.h>
 #include <haproxy/ncbuf-t.h>
 #include <haproxy/net_helper.h>