mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-02 16:21:27 +01:00
MEDIUM: quic-be: qc_send_mux() adaptation for 0-RTT
When entering this function, a selection is done about the encryption level to be used to send data. For a client, the early data encryption level is used to send 0-RTT if this encryption level is initialized. The Initial encryption is also registered to the send list for clients if there is Initial crypto data to send. This allow Initial and 0-RTT packets to be coalesced by datagrams.
This commit is contained in:
parent
a4bbbc75db
commit
3f60891360
@ -516,6 +516,8 @@ enum quic_tx_err qc_send_mux(struct quic_conn *qc, struct list *frms,
|
|||||||
struct list send_list = LIST_HEAD_INIT(send_list);
|
struct list send_list = LIST_HEAD_INIT(send_list);
|
||||||
enum quic_tx_err ret = QUIC_TX_ERR_NONE;
|
enum quic_tx_err ret = QUIC_TX_ERR_NONE;
|
||||||
int max_dgram = 0, sent;
|
int max_dgram = 0, sent;
|
||||||
|
struct quic_enc_level *qel = !qc_is_back(qc) ? qc->ael :
|
||||||
|
qc->eel ? qc->eel : qc->ael;
|
||||||
|
|
||||||
TRACE_ENTER(QUIC_EV_CONN_TXPKT, qc);
|
TRACE_ENTER(QUIC_EV_CONN_TXPKT, qc);
|
||||||
|
|
||||||
@ -525,6 +527,10 @@ enum quic_tx_err qc_send_mux(struct quic_conn *qc, struct list *frms,
|
|||||||
return QUIC_TX_ERR_FATAL;
|
return QUIC_TX_ERR_FATAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The QUIC client may need to send Initial CRYPTO data before early data. */
|
||||||
|
if (qc_is_back(qc) && qel == qc->eel && qel_need_sending(qc->iel, qc))
|
||||||
|
qel_register_send(&send_list, qc->iel, &qc->iel->pktns->tx.frms);
|
||||||
|
|
||||||
/* Try to send post handshake frames first unless on 0-RTT. */
|
/* Try to send post handshake frames first unless on 0-RTT. */
|
||||||
if ((qc->flags & QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS) &&
|
if ((qc->flags & QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS) &&
|
||||||
qc->state >= QUIC_HS_ST_COMPLETE) {
|
qc->state >= QUIC_HS_ST_COMPLETE) {
|
||||||
@ -539,7 +545,7 @@ enum quic_tx_err qc_send_mux(struct quic_conn *qc, struct list *frms,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TRACE_STATE("preparing data (from MUX)", QUIC_EV_CONN_TXPKT, qc);
|
TRACE_STATE("preparing data (from MUX)", QUIC_EV_CONN_TXPKT, qc);
|
||||||
qel_register_send(&send_list, qc->ael, frms);
|
qel_register_send(&send_list, qel, frms);
|
||||||
sent = qc_send(qc, 0, &send_list, max_dgram);
|
sent = qc_send(qc, 0, &send_list, max_dgram);
|
||||||
|
|
||||||
if (pacer && qc->path->cc.algo->check_app_limited)
|
if (pacer && qc->path->cc.algo->check_app_limited)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user