MINOR: quic-be: I/O handler switch adaptation

For connection to QUIC servers, this patch modifies the moment where the I/O
handler callback is switched to quic_conn_app_io_cb(). This is no more
done as for listener just after the handshake has completed but just after
it has been confirmed.
This commit is contained in:
Frederic Lecaille 2024-01-16 10:30:13 +01:00
parent a0d2a4fcfd
commit 7fc69b202a
2 changed files with 7 additions and 4 deletions

View File

@ -836,6 +836,10 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
qc_set_timer(qc);
qc_el_rx_pkts_del(qc->hel);
qc_release_pktns_frms(qc, qc->hel->pktns);
if (!qc_is_listener(qc)) {
/* I/O callback switch */
qc->wait_event.tasklet->process = quic_conn_app_io_cb;
}
}
if (qc_is_listener(qc) && st >= QUIC_HS_ST_COMPLETE) {
@ -1284,8 +1288,7 @@ struct quic_conn *qc_new_conn(const struct quic_version *qv, int ipv4,
qc->max_ack_delay = 0;
/* Only one path at this time (multipath not supported) */
qc->path = &qc->paths[0];
quic_cc_path_init(qc->path, ipv4,
server ? l->bind_conf->max_cwnd : 0,
quic_cc_path_init(qc->path, ipv4, server ? l->bind_conf->max_cwnd : 0,
cc_algo ? cc_algo : default_quic_cc_algo, qc);
if (local_addr)

View File

@ -955,10 +955,10 @@ static int qc_ssl_provide_quic_data(struct ncbuf *ncbuf,
qc->mux_state = QC_MUX_READY;
}
/* I/O callback switch */
qc->wait_event.tasklet->process = quic_conn_app_io_cb;
qc->flags |= QUIC_FL_CONN_NEED_POST_HANDSHAKE_FRMS;
if (qc_is_listener(ctx->qc)) {
/* I/O callback switch */
qc->wait_event.tasklet->process = quic_conn_app_io_cb;
qc->state = QUIC_HS_ST_CONFIRMED;
if (!(qc->flags & QUIC_FL_CONN_ACCEPT_REGISTERED)) {