Lines Matching refs:enc_level
158 uint32_t enc_level; member
188 uint32_t enc_level, size_t max_ppl, size_t reserve) in tx_helper_init() argument
194 h->enc_level = enc_level; in tx_helper_init()
205 if (max_ppl > h->txp->el[enc_level].scratch_len) { in tx_helper_init()
208 scratch = OPENSSL_realloc(h->txp->el[enc_level].scratch, max_ppl); in tx_helper_init()
212 h->txp->el[enc_level].scratch = scratch; in tx_helper_init()
213 h->txp->el[enc_level].scratch_len = max_ppl; in tx_helper_init()
250 struct txp_el *el = &h->txp->el[h->enc_level]; in tx_helper_append_iovec()
289 struct txp_el *el = &h->txp->el[h->enc_level]; in tx_helper_begin()
427 uint32_t enc_level,
434 uint32_t enc_level,
442 uint32_t enc_level, uint32_t archetype,
496 uint32_t enc_level; in ossl_quic_tx_packetiser_free() local
505 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_free()
506 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_free()
507 ++enc_level) { in ossl_quic_tx_packetiser_free()
508 OPENSSL_free(txp->el[enc_level].iovec); in ossl_quic_tx_packetiser_free()
509 OPENSSL_free(txp->el[enc_level].scratch); in ossl_quic_tx_packetiser_free()
639 uint32_t enc_level) in ossl_quic_tx_packetiser_discard_enc_level() argument
641 if (enc_level >= QUIC_ENC_LEVEL_NUM) { in ossl_quic_tx_packetiser_discard_enc_level()
646 if (enc_level != QUIC_ENC_LEVEL_0RTT) in ossl_quic_tx_packetiser_discard_enc_level()
647 txp->args.crypto[ossl_quic_enc_level_to_pn_space(enc_level)] = NULL; in ossl_quic_tx_packetiser_discard_enc_level()
768 uint32_t archetype, enc_level; in ossl_quic_tx_packetiser_generate() local
775 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_generate()
776 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_generate()
777 ++enc_level) in ossl_quic_tx_packetiser_generate()
778 pkt[enc_level].h_valid = 0; in ossl_quic_tx_packetiser_generate()
792 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_generate()
793 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_generate()
794 ++enc_level) { in ossl_quic_tx_packetiser_generate()
795 size_t running_total = (enc_level > QUIC_ENC_LEVEL_INITIAL) in ossl_quic_tx_packetiser_generate()
796 ? pkt[enc_level - 1].geom.hwm : 0; in ossl_quic_tx_packetiser_generate()
798 pkt[enc_level].geom.hwm = running_total; in ossl_quic_tx_packetiser_generate()
800 if (!txp_should_try_staging(txp, enc_level, archetype, cc_limit, in ossl_quic_tx_packetiser_generate()
804 if (!txp_pkt_init(&pkt[enc_level], txp, enc_level, archetype, in ossl_quic_tx_packetiser_generate()
813 rc = txp_generate_for_el(txp, &pkt[enc_level], in ossl_quic_tx_packetiser_generate()
814 conn_close_enc_level == enc_level); in ossl_quic_tx_packetiser_generate()
818 if (pkt[enc_level].force_pad) in ossl_quic_tx_packetiser_generate()
824 pkt[enc_level].geom.hwm = running_total in ossl_quic_tx_packetiser_generate()
825 + pkt[enc_level].h.bytes_appended in ossl_quic_tx_packetiser_generate()
826 + pkt[enc_level].geom.pkt_overhead; in ossl_quic_tx_packetiser_generate()
843 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_generate()
844 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_generate()
845 ++enc_level) in ossl_quic_tx_packetiser_generate()
846 if (pkt[enc_level].h_valid && pkt[enc_level].h.bytes_appended > 0) { in ossl_quic_tx_packetiser_generate()
852 && pkt[enc_level].geom.adata.allow_padding in ossl_quic_tx_packetiser_generate()
853 && !pkt[enc_level].h.done_implicit) in ossl_quic_tx_packetiser_generate()
854 pad_el = enc_level; in ossl_quic_tx_packetiser_generate()
856 txp_pkt_postgen_update_pkt_overhead(&pkt[enc_level], txp); in ossl_quic_tx_packetiser_generate()
857 total_dgram_size += pkt[enc_level].geom.pkt_overhead in ossl_quic_tx_packetiser_generate()
858 + pkt[enc_level].h.bytes_appended; in ossl_quic_tx_packetiser_generate()
890 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_generate()
891 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_generate()
892 ++enc_level) { in ossl_quic_tx_packetiser_generate()
894 if (!pkt[enc_level].h_valid) in ossl_quic_tx_packetiser_generate()
898 if (pkt[enc_level].h.bytes_appended == 0) in ossl_quic_tx_packetiser_generate()
902 rc = txp_pkt_commit(txp, &pkt[enc_level], archetype, in ossl_quic_tx_packetiser_generate()
907 || pkt[enc_level].tpkt->ackm_pkt.is_ack_eliciting; in ossl_quic_tx_packetiser_generate()
909 if (enc_level == QUIC_ENC_LEVEL_HANDSHAKE) in ossl_quic_tx_packetiser_generate()
911 = (pkt[enc_level].h_valid in ossl_quic_tx_packetiser_generate()
912 && pkt[enc_level].h.bytes_appended > 0); in ossl_quic_tx_packetiser_generate()
916 pkt[enc_level].tpkt = NULL; /* don't free */ in ossl_quic_tx_packetiser_generate()
929 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_generate()
930 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_generate()
931 ++enc_level) in ossl_quic_tx_packetiser_generate()
932 txp_pkt_cleanup(&pkt[enc_level], txp); in ossl_quic_tx_packetiser_generate()
1194 static int txp_get_archetype_data(uint32_t enc_level, in txp_get_archetype_data() argument
1198 if (enc_level >= QUIC_ENC_LEVEL_NUM in txp_get_archetype_data()
1203 *a = archetypes[enc_level][archetype]; in txp_get_archetype_data()
1209 uint32_t enc_level, in txp_determine_geometry() argument
1217 if (!txp_get_archetype_data(enc_level, archetype, &geom->adata)) in txp_determine_geometry()
1221 phdr->type = ossl_quic_enc_level_to_pkt_type(enc_level); in txp_determine_geometry()
1253 if (enc_level == QUIC_ENC_LEVEL_INITIAL) { in txp_determine_geometry()
1280 if (!txp_determine_ppl_from_pl(txp, cmpl, enc_level, hdr_len, &geom->cmppl)) in txp_determine_geometry()
1325 uint32_t enc_level, in txp_should_try_staging() argument
1331 uint32_t pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in txp_should_try_staging()
1334 if (!ossl_qtx_is_enc_level_provisioned(txp->args.qtx, enc_level)) in txp_should_try_staging()
1337 if (!txp_get_archetype_data(enc_level, archetype, &a)) in txp_should_try_staging()
1373 if (*conn_close_enc_level > enc_level in txp_should_try_staging()
1375 *conn_close_enc_level = enc_level; in txp_should_try_staging()
1382 if ((enc_level == QUIC_ENC_LEVEL_INITIAL in txp_should_try_staging()
1384 || (enc_level == QUIC_ENC_LEVEL_HANDSHAKE in txp_should_try_staging()
1425 *conn_close_enc_level == enc_level) in txp_should_try_staging()
1435 if (enc_level != QUIC_ENC_LEVEL_0RTT) in txp_should_try_staging()
1503 uint32_t enc_level, in txp_determine_ppl_from_pl() argument
1512 if (!ossl_qtx_calculate_plaintext_payload_len(txp->args.qtx, enc_level, in txp_determine_ppl_from_pl()
1613 uint32_t enc_level, uint32_t archetype, in txp_pkt_init() argument
1616 uint32_t pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in txp_pkt_init()
1618 if (!txp_determine_geometry(txp, archetype, enc_level, in txp_pkt_init()
1626 if (!tx_helper_init(&pkt->h, txp, enc_level, in txp_pkt_init()
1668 if (pkt->h.enc_level == QUIC_ENC_LEVEL_INITIAL) in txp_pkt_postgen_update_pkt_overhead()
1680 if (!ossl_qtx_calculate_ciphertext_payload_len(txp->args.qtx, pkt->h.enc_level, in txp_pkt_postgen_update_pkt_overhead()
1824 const uint32_t enc_level = pkt->h.enc_level; in txp_generate_pre_token() local
1825 const uint32_t pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in txp_generate_pre_token()
2039 const uint32_t enc_level = pkt->h.enc_level; in txp_generate_crypto_frames() local
2040 const uint32_t pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in txp_generate_crypto_frames()
2089 if (!txp_el_ensure_iovec(&txp->el[enc_level], h->num_iovec + 3)) in txp_generate_crypto_frames()
2196 const uint32_t enc_level = pkt->h.enc_level; in txp_generate_stream_frames() local
2335 if (!txp_el_ensure_iovec(&txp->el[enc_level], h->num_iovec + 3)) in txp_generate_stream_frames()
2570 const uint32_t enc_level = pkt->h.enc_level; in txp_generate_for_el() local
2571 const uint32_t pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in txp_generate_for_el()
2889 uint32_t enc_level = pkt->h.enc_level; in txp_pkt_commit() local
2890 uint32_t pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in txp_pkt_commit()
2902 if (!txp_get_archetype_data(enc_level, archetype, &a)) in txp_pkt_commit()
2907 txpkt.iovec = txp->el[enc_level].iovec; in txp_pkt_commit()
3036 if (enc_level == QUIC_ENC_LEVEL_INITIAL in txp_pkt_commit()
3040 if (enc_level == QUIC_ENC_LEVEL_HANDSHAKE in txp_pkt_commit()
3132 uint32_t enc_level, pn_space; in ossl_quic_tx_packetiser_get_deadline() local
3140 for (enc_level = QUIC_ENC_LEVEL_INITIAL; in ossl_quic_tx_packetiser_get_deadline()
3141 enc_level < QUIC_ENC_LEVEL_NUM; in ossl_quic_tx_packetiser_get_deadline()
3142 ++enc_level) in ossl_quic_tx_packetiser_get_deadline()
3143 if (ossl_qtx_is_enc_level_provisioned(txp->args.qtx, enc_level)) { in ossl_quic_tx_packetiser_get_deadline()
3144 pn_space = ossl_quic_enc_level_to_pn_space(enc_level); in ossl_quic_tx_packetiser_get_deadline()