void quic_free_ncbuf(struct ncbuf *ncbuf);
int qc_release_lost_pkts(struct quic_conn *qc, struct quic_pktns *pktns,
struct list *pkts, uint64_t now_us);
+int qc_treat_rx_crypto_frms(struct quic_conn *qc, struct quic_enc_level *el,
+ struct ssl_sock_ctx *ctx);
#endif /* _HAPROXY_QUIC_RX_H */
goto leave;
}
+ if (ncb_data(ncbuf, 0))
+ HA_ATOMIC_OR(&qc->wait_event.tasklet->state, TASK_HEAVY);
+
done:
ret = 1;
leave:
* stream for this level.
* Return 1 if succeeded, 0 if not.
*/
-static int qc_treat_rx_crypto_frms(struct quic_conn *qc,
- struct quic_enc_level *el,
- struct ssl_sock_ctx *ctx)
+int qc_treat_rx_crypto_frms(struct quic_conn *qc, struct quic_enc_level *el,
+ struct ssl_sock_ctx *ctx)
{
int ret = 0;
struct ncbuf *ncbuf;
qel->pktns->flags |= QUIC_FL_PKTNS_NEW_LARGEST_PN;
}
- if (qel->cstream && !qc_treat_rx_crypto_frms(qc, qel, qc->xprt_ctx)) {
- // trace already emitted by function above
- goto leave;
+ 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. */
QUIC_EV_CONN_PHPKTS, qc, qel);
}
- if (ncb_is_empty(ncbuf)) {
- TRACE_DEVEL("freeing crypto buf", QUIC_EV_CONN_PHPKTS, qc, qel);
- quic_free_ncbuf(ncbuf);
- }
+ if (!qc_treat_rx_crypto_frms(qc, qel, ctx))
+ ssl_ret = 0;
if (!ssl_ret)
goto leave;