From b5821e12cebe88c7035f6c96ac933bb4e1b54486 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 26 Apr 2022 11:54:08 +0200 Subject: [PATCH] MINOR: connection: add flag MX_FL_FRAMED to mark muxes relying on framed xprt In order to be able to check compatibility between muxes and transport layers, we'll need a new flag to tag muxes that work on framed transport layers like QUIC. Only QUIC has this flag now. --- include/haproxy/connection-t.h | 1 + src/connection.c | 3 +++ src/mux_quic.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index ca7819616..77b43b842 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -280,6 +280,7 @@ enum { MX_FL_HTX = 0x00000001, /* set if it is an HTX multiplexer */ MX_FL_HOL_RISK = 0x00000002, /* set if the protocol is subject the to head-of-line blocking on server */ MX_FL_NO_UPG = 0x00000004, /* set if mux does not support any upgrade */ + MX_FL_FRAMED = 0x00000008, /* mux working on top of a framed transport layer (QUIC) */ }; /* PROTO token registration */ diff --git a/src/connection.c b/src/connection.c index 2ead71470..dd1898bf9 100644 --- a/src/connection.c +++ b/src/connection.c @@ -1707,6 +1707,9 @@ void list_mux_proto(FILE *out) if (item->mux->flags & MX_FL_NO_UPG) done |= fprintf(out, "%sNO_UPG", done ? "|" : ""); + if (item->mux->flags & MX_FL_FRAMED) + done |= fprintf(out, "%sFRAMED", done ? "|" : ""); + fprintf(out, "\n"); } } diff --git a/src/mux_quic.c b/src/mux_quic.c index 77bb7aea4..4c240c8b2 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -1678,7 +1678,7 @@ static const struct mux_ops qc_ops = { .subscribe = qc_subscribe, .unsubscribe = qc_unsubscribe, .wake = qc_wake, - .flags = MX_FL_HTX|MX_FL_NO_UPG, + .flags = MX_FL_HTX|MX_FL_NO_UPG|MX_FL_FRAMED, .name = "QUIC", };