]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: abstract stream type in qf_stream frame
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 10 Dec 2025 09:43:36 +0000 (10:43 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 Apr 2026 12:02:04 +0000 (14:02 +0200)
STREAM frame will also be used by the new QMux protocol. This requires
some adaptation in the qf_stream structure. Reference to qc_stream_desc
object is replaced by a generic void* pointer.

This change is necessary as QMux protocol will not use any
qc_stream_desc elements for emission.

include/haproxy/quic_frame-t.h
src/mux_quic.c

index 86705e36c8d5ba1db5ecffd6b63961c9b8f670fa..c94aff0f5cba08a087895c0a2413276603a92c04 100644 (file)
@@ -32,7 +32,6 @@
 #include <import/ebtree-t.h>
 #include <haproxy/buf-t.h>
 #include <haproxy/list.h>
-#include <haproxy/quic_stream-t.h>
 #include <haproxy/quic_token.h>
 
 extern struct pool_head *pool_head_quic_frame;
@@ -170,7 +169,7 @@ struct qf_new_token {
 
 struct qf_stream {
        uint64_t id;
-       struct qc_stream_desc *stream;
+       void *stream;
 
        /* used only on TX when constructing frames.
         * Data cleared when processing ACK related to this STREAM frame.
index 1abc8a407e473230238eb74cea157e282679bfc3..2c36d8d9d68cc5bba531b85c29b7d7d70599e4af 100644 (file)
@@ -2499,7 +2499,8 @@ static int qcs_build_stream_frm(struct qcs *qcs, struct buffer *out, char fin,
                goto err;
        }
 
-       frm->stream.stream = qcs->tx.stream;
+       frm->stream.stream =
+         conn_is_quic(qcc->conn) ? (void *)qcs->tx.stream : (void *)qcs;
        frm->stream.id = qcs->id;
        frm->stream.offset = 0;
        frm->stream.dup = 0;