Lines Matching refs:hwq
83 #define HWQ_CMP(idx, hwq) ((idx) & ((hwq)->max_elements - 1)) argument
85 #define HWQ_FREE_SLOTS(hwq) (hwq->max_elements - \ argument
86 ((HWQ_CMP(hwq->prod, hwq)\
87 - HWQ_CMP(hwq->cons, hwq))\
88 & (hwq->max_elements - 1)))
186 struct bnxt_qplib_hwq *hwq; member
319 static inline u8 bnxt_qplib_base_pg_size(struct bnxt_qplib_hwq *hwq) in bnxt_qplib_base_pg_size() argument
324 pbl = &hwq->pbl[PBL_LVL_0]; in bnxt_qplib_base_pg_size()
351 static inline void *bnxt_qplib_get_qe(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_get_qe() argument
356 pg_num = (indx / hwq->qe_ppg); in bnxt_qplib_get_qe()
357 pg_idx = (indx % hwq->qe_ppg); in bnxt_qplib_get_qe()
359 *pg = (u64)&hwq->pbl_ptr[pg_num]; in bnxt_qplib_get_qe()
360 return (void *)(hwq->pbl_ptr[pg_num] + hwq->element_size * pg_idx); in bnxt_qplib_get_qe()
363 static inline void *bnxt_qplib_get_prod_qe(struct bnxt_qplib_hwq *hwq, u32 idx) in bnxt_qplib_get_prod_qe() argument
365 idx += hwq->prod; in bnxt_qplib_get_prod_qe()
366 if (idx >= hwq->depth) in bnxt_qplib_get_prod_qe()
367 idx -= hwq->depth; in bnxt_qplib_get_prod_qe()
368 return bnxt_qplib_get_qe(hwq, idx, NULL); in bnxt_qplib_get_prod_qe()
378 struct bnxt_qplib_hwq *hwq);
379 int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,
408 struct bnxt_qplib_hwq *hwq, u32 cnt) in bnxt_qplib_hwq_incr_prod() argument
411 hwq->prod += cnt; in bnxt_qplib_hwq_incr_prod()
412 if (hwq->prod >= hwq->depth) { in bnxt_qplib_hwq_incr_prod()
413 hwq->prod %= hwq->depth; in bnxt_qplib_hwq_incr_prod()
434 key |= info->hwq->cons | (CMPL_DOORBELL_IDX_VALID | in bnxt_qplib_ring_db32()
448 key |= (info->hwq->cons & DBC_DBC_INDEX_MASK); in bnxt_qplib_ring_db()
459 key |= ((info->hwq->prod / info->max_slot)) & DBC_DBC_INDEX_MASK; in bnxt_qplib_ring_prod_db()