This is a follow-up on the QUIC MUX renaming process.
The current patch performs renaming of "qstrm" to "qmux" in connection
flags. These flags are only used in linked with the xprt_qmux layer.
This has an impact on every files which manipulates these flags, namely
backend, session and ssl_sock sources.
Also, internal xprt identifier is renamed from XPRT_QSTRM to XPRT_QMUX,
CO_FL_OPT_TOS = 0x00000020, /* connection has a special sockopt tos */
- CO_FL_QSTRM_SEND = 0x00000040, /* connection uses QMux protocol, needs to exchange transport parameters before starting mux layer */
- CO_FL_QSTRM_RECV = 0x00000080, /* connection uses QMux protocol, needs to exchange transport parameters before starting mux layer */
+ CO_FL_QMUX_SEND = 0x00000040, /* connection uses QMux protocol, needs to exchange transport parameters before starting mux layer */
+ CO_FL_QMUX_RECV = 0x00000080, /* connection uses QMux protocol, needs to exchange transport parameters before starting mux layer */
/* These flags indicate whether the Control and Transport layers are initialized */
CO_FL_CTRL_READY = 0x00000100, /* FD was registered, fd_delete() needed */
/* flags */
_(CO_FL_SAFE_LIST, _(CO_FL_IDLE_LIST, _(CO_FL_CTRL_READY,
_(CO_FL_REVERSED, _(CO_FL_ACT_REVERSING, _(CO_FL_OPT_MARK, _(CO_FL_OPT_TOS,
- _(CO_FL_QSTRM_SEND, _(CO_FL_QSTRM_RECV,
+ _(CO_FL_QMUX_SEND, _(CO_FL_QMUX_RECV,
_(CO_FL_XPRT_READY, _(CO_FL_WANT_DRAIN, _(CO_FL_WAIT_ROOM, _(CO_FL_SSL_NO_CACHED_INFO, _(CO_FL_EARLY_SSL_HS,
_(CO_FL_EARLY_DATA, _(CO_FL_SOCKS4_SEND, _(CO_FL_SOCKS4_RECV, _(CO_FL_SOCK_RD_SH,
_(CO_FL_SOCK_WR_SH, _(CO_FL_ERROR, _(CO_FL_FDLESS, _(CO_FL_WAIT_L4_CONN,
CO_ER_SSL_FATAL, /* SSL fatal error during a SSL_read or SSL_write */
- CO_ER_QSTRM, /* QMux transport parameter exchange failure */
+ CO_ER_QMUX, /* QMux transport parameter exchange failure */
CO_ER_REVERSE, /* Error during reverse connect */
XPRT_SSL = 1,
XPRT_HANDSHAKE = 2,
XPRT_QUIC = 3,
- XPRT_QSTRM = 4,
+ XPRT_QMUX = 4,
XPRT_ENTRIES /* must be last one */
};
}
if (srv && srv->mux_proto && isteq(srv->mux_proto->token, ist("qmux"))) {
- srv_conn->flags |= (CO_FL_QSTRM_RECV|CO_FL_QSTRM_SEND);
+ srv_conn->flags |= (CO_FL_QMUX_RECV|CO_FL_QMUX_SEND);
may_start_mux_now = 0;
}
* information to create one, typically from the ALPN. If we're
* done with the handshake, attempt to create one.
*/
- if (unlikely(!conn->mux) && !(conn->flags & (CO_FL_WAIT_XPRT|CO_FL_QSTRM_RECV|CO_FL_QSTRM_SEND))) {
+ if (unlikely(!conn->mux) && !(conn->flags & (CO_FL_WAIT_XPRT|CO_FL_QMUX_RECV|CO_FL_QMUX_SEND))) {
ret = conn_create_mux(conn, NULL);
if (ret < 0)
goto done;
case CO_ER_SSL_FATAL: return "SSL fatal error";
- case CO_ER_QSTRM: return "Error during QMux transport parameters initial exchange";
+ case CO_ER_QMUX: return "Error during QMux transport parameters initial exchange";
case CO_ER_REVERSE: return "Reverse connect failure";
cli_conn->flags |= CO_FL_ACCEPT_CIP;
if (l->bind_conf->mux_proto && isteq(l->bind_conf->mux_proto->token, ist("qmux")))
- cli_conn->flags |= (CO_FL_QSTRM_RECV|CO_FL_QSTRM_SEND);
+ cli_conn->flags |= (CO_FL_QMUX_RECV|CO_FL_QMUX_SEND);
/* Add the handshake pseudo-XPRT */
if (cli_conn->flags & (CO_FL_ACCEPT_PROXY | CO_FL_ACCEPT_CIP)) {
conn->err_code == CO_ER_PRX_EMPTY || conn->err_code == CO_ER_PRX_ABORT ||
conn->err_code == CO_ER_CIP_EMPTY || conn->err_code == CO_ER_CIP_ABORT ||
conn->err_code == CO_ER_SSL_EMPTY || conn->err_code == CO_ER_SSL_ABORT ||
- conn->err_code == CO_ER_QSTRM)
+ conn->err_code == CO_ER_QMUX)
log = 0;
}
conn->err_code = CO_ER_CIP_TIMEOUT;
else if (conn->flags & CO_FL_SSL_WAIT_HS)
conn->err_code = CO_ER_SSL_TIMEOUT;
- else if (conn->flags & CO_FL_QSTRM_RECV)
- conn->err_code = CO_ER_QSTRM;
+ else if (conn->flags & CO_FL_QMUX_RECV)
+ conn->err_code = CO_ER_QMUX;
}
sess_log_embryonic(sess);
int closed_connection = 0;
if (!ctx->conn->mux) {
- if (ctx->conn->flags & (CO_FL_QSTRM_RECV|CO_FL_QSTRM_SEND)) {
- const struct xprt_ops *ops = xprt_get(XPRT_QSTRM);
+ if (ctx->conn->flags & (CO_FL_QMUX_RECV|CO_FL_QMUX_SEND)) {
+ const struct xprt_ops *ops = xprt_get(XPRT_QMUX);
void *xprt_ctx_hs = NULL;
ret = ops->init(conn, &xprt_ctx_hs);
return 0;
fail:
- conn->err_code = CO_ER_QSTRM;
+ conn->err_code = CO_ER_QMUX;
conn->flags |= CO_FL_ERROR;
return 0;
}
return 0;
fail:
- conn->err_code = CO_ER_QSTRM;
+ conn->err_code = CO_ER_QMUX;
conn->flags |= CO_FL_ERROR;
return 0;
}
struct connection *conn = ctx->conn;
int free = 0, ret;
- if (conn->flags & CO_FL_QSTRM_SEND) {
- if (!conn_send_qstrm(conn, ctx, CO_FL_QSTRM_SEND)) {
+ if (conn->flags & CO_FL_QMUX_SEND) {
+ if (!conn_send_qstrm(conn, ctx, CO_FL_QMUX_SEND)) {
if (!(conn->flags & CO_FL_ERROR)) {
ctx->ops_lower->subscribe(conn, ctx->ctx_lower,
SUB_RETRY_SEND, &ctx->wait_event);
}
}
- if (conn->flags & CO_FL_QSTRM_RECV) {
- if (!conn_recv_qstrm(conn, ctx, CO_FL_QSTRM_RECV)) {
+ if (conn->flags & CO_FL_QMUX_RECV) {
+ if (!conn_recv_qstrm(conn, ctx, CO_FL_QMUX_RECV)) {
if (!(conn->flags & CO_FL_ERROR)) {
ctx->ops_lower->subscribe(conn, ctx->ctx_lower,
SUB_RETRY_RECV, &ctx->wait_event);
out:
if ((conn->flags & CO_FL_ERROR) ||
- !(conn->flags & (CO_FL_QSTRM_RECV|CO_FL_QSTRM_SEND))) {
+ !(conn->flags & (CO_FL_QMUX_RECV|CO_FL_QMUX_SEND))) {
/* XPRT should be unsubscribed when transfer done or on error. */
BUG_ON(ctx->wait_event.events);
if (ctx->ops_lower && ctx->ops_lower->close)
ctx->ops_lower->close(conn, ctx->ctx_lower);
- conn->flags &= ~(CO_FL_QSTRM_RECV|CO_FL_QSTRM_SEND);
+ conn->flags &= ~(CO_FL_QMUX_RECV|CO_FL_QMUX_SEND);
BUG_ON(conn->xprt_ctx != ctx);
conn->xprt_ctx = ctx->ctx_lower;
return ctx->ops_lower->get_alpn(conn, ctx->ctx_lower, str, len);
}
-struct xprt_ops xprt_qstrm = {
+struct xprt_ops xprt_qmux = {
.add_xprt = xprt_qstrm_add_xprt,
.init = xprt_qstrm_init,
.start = xprt_qstrm_start,
.close = xprt_qstrm_close,
.get_alpn = xprt_qstrm_get_alpn,
- .name = "qstrm",
+ .name = "qmux",
};
static void __xprt_qstrm_init(void)
{
- xprt_register(XPRT_QSTRM, &xprt_qstrm);
+ xprt_register(XPRT_QMUX, &xprt_qmux);
}
INITCALL0(STG_REGISTER, __xprt_qstrm_init);