Lines Matching refs:txfc

23 int ossl_quic_txfc_init(QUIC_TXFC *txfc, QUIC_TXFC *conn_txfc)  in OSSL_SAFE_MATH_UNSIGNED()
28 txfc->swm = 0; in OSSL_SAFE_MATH_UNSIGNED()
29 txfc->cwm = 0; in OSSL_SAFE_MATH_UNSIGNED()
30 txfc->parent = conn_txfc; in OSSL_SAFE_MATH_UNSIGNED()
31 txfc->has_become_blocked = 0; in OSSL_SAFE_MATH_UNSIGNED()
35 QUIC_TXFC *ossl_quic_txfc_get_parent(QUIC_TXFC *txfc) in ossl_quic_txfc_get_parent() argument
37 return txfc->parent; in ossl_quic_txfc_get_parent()
40 int ossl_quic_txfc_bump_cwm(QUIC_TXFC *txfc, uint64_t cwm) in ossl_quic_txfc_bump_cwm() argument
42 if (cwm <= txfc->cwm) in ossl_quic_txfc_bump_cwm()
45 txfc->cwm = cwm; in ossl_quic_txfc_bump_cwm()
49 uint64_t ossl_quic_txfc_get_credit_local(QUIC_TXFC *txfc, uint64_t consumed) in ossl_quic_txfc_get_credit_local() argument
51 assert((txfc->swm + consumed) <= txfc->cwm); in ossl_quic_txfc_get_credit_local()
52 return txfc->cwm - (consumed + txfc->swm); in ossl_quic_txfc_get_credit_local()
55 uint64_t ossl_quic_txfc_get_credit(QUIC_TXFC *txfc, uint64_t consumed) in ossl_quic_txfc_get_credit() argument
59 r = ossl_quic_txfc_get_credit_local(txfc, 0); in ossl_quic_txfc_get_credit()
61 if (txfc->parent != NULL) { in ossl_quic_txfc_get_credit()
62 assert(txfc->parent->parent == NULL); in ossl_quic_txfc_get_credit()
63 conn_r = ossl_quic_txfc_get_credit_local(txfc->parent, consumed); in ossl_quic_txfc_get_credit()
71 int ossl_quic_txfc_consume_credit_local(QUIC_TXFC *txfc, uint64_t num_bytes) in ossl_quic_txfc_consume_credit_local() argument
74 uint64_t credit = ossl_quic_txfc_get_credit_local(txfc, 0); in ossl_quic_txfc_consume_credit_local()
82 txfc->has_become_blocked = 1; in ossl_quic_txfc_consume_credit_local()
84 txfc->swm += num_bytes; in ossl_quic_txfc_consume_credit_local()
88 int ossl_quic_txfc_consume_credit(QUIC_TXFC *txfc, uint64_t num_bytes) in ossl_quic_txfc_consume_credit() argument
90 int ok = ossl_quic_txfc_consume_credit_local(txfc, num_bytes); in ossl_quic_txfc_consume_credit()
92 if (txfc->parent != NULL) { in ossl_quic_txfc_consume_credit()
93 assert(txfc->parent->parent == NULL); in ossl_quic_txfc_consume_credit()
94 if (!ossl_quic_txfc_consume_credit_local(txfc->parent, num_bytes)) in ossl_quic_txfc_consume_credit()
101 int ossl_quic_txfc_has_become_blocked(QUIC_TXFC *txfc, int clear) in ossl_quic_txfc_has_become_blocked() argument
103 int r = txfc->has_become_blocked; in ossl_quic_txfc_has_become_blocked()
106 txfc->has_become_blocked = 0; in ossl_quic_txfc_has_become_blocked()
111 uint64_t ossl_quic_txfc_get_cwm(QUIC_TXFC *txfc) in ossl_quic_txfc_get_cwm() argument
113 return txfc->cwm; in ossl_quic_txfc_get_cwm()
116 uint64_t ossl_quic_txfc_get_swm(QUIC_TXFC *txfc) in ossl_quic_txfc_get_swm() argument
118 return txfc->swm; in ossl_quic_txfc_get_swm()