mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
TMP
This commit is contained in:
parent
909158c7e0
commit
0a3aa456c7
3 changed files with 11 additions and 2 deletions
|
|
@ -247,6 +247,7 @@ struct qcc_app_ops {
|
|||
#define QC_CF_WAIT_HS 0x00000040 /* MUX init before QUIC handshake completed (0-RTT) */
|
||||
#define QC_CF_QOS 0x00000080
|
||||
#define QC_CF_QSTP_SENT 0x00000100
|
||||
#define QC_CF_QSTP_RECV 0x00000200
|
||||
|
||||
/* This function is used to report flags in debugging tools. Please reflect
|
||||
* below any single-bit flag addition above in the same order via the
|
||||
|
|
|
|||
|
|
@ -3054,7 +3054,8 @@ static int qcc_io_send(struct qcc *qcc)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (qcc->app_st < QCC_APP_ST_INIT) {
|
||||
if (qcc->app_st < QCC_APP_ST_INIT &&
|
||||
(qmux_is_quic(qcc) || (qcc->flags & QC_CF_QSTP_RECV))) {
|
||||
if (qcc_app_init(qcc))
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -3928,6 +3929,9 @@ static int qmux_init(struct connection *conn, struct proxy *prx,
|
|||
qcs->sd = sc->sedesc;
|
||||
qcc->nb_sc++;
|
||||
qcc->tot_sc++;
|
||||
|
||||
if (!qmux_is_quic(qcc))
|
||||
tasklet_wakeup(qcc->wait_event.tasklet);
|
||||
}
|
||||
|
||||
TRACE_LEAVE(QMUX_EV_QCC_NEW, conn);
|
||||
|
|
@ -4682,6 +4686,6 @@ static const struct mux_ops qmux_qos_ops = {
|
|||
};
|
||||
|
||||
static struct mux_proto_list mux_proto_qos =
|
||||
{ .token = IST("qos"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_FE, .mux = &qmux_qos_ops };
|
||||
{ .token = IST("qos"), .mode = PROTO_MODE_HTTP, .side = PROTO_SIDE_BOTH, .mux = &qmux_qos_ops };
|
||||
|
||||
INITCALL1(STG_REGISTER, register_mux_proto, &mux_proto_qos);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
int qcc_qos_recv(struct qcc *qcc)
|
||||
{
|
||||
/* TODO ajouter un buffer par connexion pour lecture des data incomplètes */
|
||||
struct connection *conn = qcc->conn;
|
||||
struct quic_frame frm;
|
||||
const unsigned char *pos, *end;
|
||||
|
|
@ -47,6 +48,8 @@ int qcc_qos_recv(struct qcc *qcc)
|
|||
qcc->rfctl.msd_uni_l = qs_tp_frm->tps.initial_max_stream_data_uni;
|
||||
fprintf(stderr, " initial_max_streams_bidi=%llu\n", (ullong)qs_tp_frm->tps.initial_max_streams_bidi);
|
||||
fprintf(stderr, " initial_max_streams_uni=%llu\n", (ullong)qs_tp_frm->tps.initial_max_streams_uni);
|
||||
|
||||
qcc->flags |= QC_CF_QSTP_RECV;
|
||||
}
|
||||
else if (frm.type >= QUIC_FT_STREAM_8 &&
|
||||
frm.type <= QUIC_FT_STREAM_F) {
|
||||
|
|
@ -160,6 +163,7 @@ int qcc_qos_send_frames(struct qcc *qcc, struct list *frms, int stream)
|
|||
}
|
||||
else if (!LIST_ISEMPTY(frms) && !(qcc->wait_event.events & SUB_RETRY_SEND)) {
|
||||
conn->xprt->subscribe(conn, conn->xprt_ctx, SUB_RETRY_SEND, &qcc->wait_event);
|
||||
return 1;
|
||||
}
|
||||
|
||||
TRACE_LEAVE(QMUX_EV_QCC_SEND, qcc->conn);
|
||||
|
|
|
|||
Loading…
Reference in a new issue