TRACE_PROTO("connection state", QUIC_EV_CONN_IO_CB, qc, &st);
if (HA_ATOMIC_LOAD(&tl->state) & TASK_HEAVY) {
- HA_ATOMIC_AND(&tl->state, ~TASK_HEAVY);
qc_ssl_provide_all_quic_data(qc, qc->xprt_ctx);
+ HA_ATOMIC_AND(&tl->state, ~TASK_HEAVY);
}
/* Retranmissions */
if (!qc_treat_rx_pkts(qc))
goto out;
- if (HA_ATOMIC_LOAD(&tl->state) & TASK_HEAVY) {
- tasklet_wakeup(tl);
- goto out;
- }
-
if (qc->flags & QUIC_FL_CONN_TO_KILL) {
TRACE_DEVEL("connection to be killed", QUIC_EV_CONN_PHPKTS, qc);
goto out;
goto leave;
}
- if (ncb_data(ncbuf, 0))
+ /* Reschedule with TASK_HEAVY if CRYPTO data ready for decoding. */
+ if (ncb_data(ncbuf, 0)) {
HA_ATOMIC_OR(&qc->wait_event.tasklet->state, TASK_HEAVY);
+ tasklet_wakeup(qc->wait_event.tasklet);
+ }
done:
ret = 1;
qel->pktns->flags |= QUIC_FL_PKTNS_NEW_LARGEST_PN;
}
- if (qel->cstream) {
- struct ncbuf *ncbuf = &qel->cstream->rx.ncbuf;
-
- if (!ncb_is_null(ncbuf) && ncb_data(ncbuf, 0)) {
- /* Some in order CRYPTO data were bufferized. */
- HA_ATOMIC_OR(&qc->wait_event.tasklet->state, TASK_HEAVY);
- }
- }
-
/* Release the Initial encryption level and packet number space. */
if ((qc->flags & QUIC_FL_CONN_IPKTNS_DCD) && qel == qc->iel) {
qc_enc_level_free(qc, &qc->iel);