24 #ifndef __MOTR_BE_TX_CREDIT_H__ 25 #define __MOTR_BE_TX_CREDIT_H__ 65 #define M0_DEBUG_BE_CREDITS (0) 67 #define M0_DEBUG_BE_CREDITS (1) 94 #define M0_BE_TX_CREDIT(nr, size) \ 95 (struct m0_be_tx_credit){ .tc_reg_nr = (nr), .tc_reg_size = (size) } 97 #define M0_BE_TX_CREDIT_TYPE(type) M0_BE_TX_CREDIT(1, sizeof(type)) 98 #define M0_BE_TX_CREDIT_PTR(ptr) M0_BE_TX_CREDIT(1, sizeof *(ptr)) 99 #define M0_BE_TX_CREDIT_BUF(buf) M0_BE_TX_CREDIT(1, (buf)->b_nob) 102 #define BETXCR_F "(%lu,%lu)" 113 #define BETXCR_P(c) (unsigned long)(c)->tc_reg_nr, \ 114 (unsigned long)(c)->tc_reg_size M0_INTERNAL void m0_be_tx_credit_add_max(struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
M0_INTERNAL void m0_be_tx_credit_sub(struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
const struct m0_be_tx_credit m0_be_tx_credit_invalid
M0_INTERNAL bool m0_be_tx_credit_eq(const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
M0_INTERNAL void m0_be_tx_credit_mac(struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c1, m0_bcount_t k)
unsigned tc_balance[M0_BE_CU_NR]
static struct m0_addb2_callback c
M0_INTERNAL void m0_be_tx_credit_mul(struct m0_be_tx_credit *c, m0_bcount_t k)
M0_INTERNAL void m0_be_tx_credit_add(struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
static struct bulkio_params * bp
M0_INTERNAL bool m0_be_tx_credit_le(const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)
M0_INTERNAL void m0_be_tx_credit_mul_bp(struct m0_be_tx_credit *c, unsigned bp)
M0_INTERNAL void m0_be_tx_credit_max(struct m0_be_tx_credit *c, const struct m0_be_tx_credit *c0, const struct m0_be_tx_credit *c1)