Lines Matching refs:hwq

71 #define HWQ_CMP(idx, hwq)	((idx) & ((hwq)->max_elements - 1))  argument
73 #define HWQ_FREE_SLOTS(hwq) (hwq->max_elements - \ argument
74 ((HWQ_CMP(hwq->prod, hwq)\
75 - HWQ_CMP(hwq->cons, hwq))\
76 & (hwq->max_elements - 1)))
173 struct bnxt_qplib_hwq *hwq; member
291 static inline u8 bnxt_qplib_base_pg_size(struct bnxt_qplib_hwq *hwq) in bnxt_qplib_base_pg_size() argument
296 pbl = &hwq->pbl[PBL_LVL_0]; in bnxt_qplib_base_pg_size()
323 static inline void *bnxt_qplib_get_qe(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_get_qe() argument
328 pg_num = (indx / hwq->qe_ppg); in bnxt_qplib_get_qe()
329 pg_idx = (indx % hwq->qe_ppg); in bnxt_qplib_get_qe()
331 *pg = (u64)&hwq->pbl_ptr[pg_num]; in bnxt_qplib_get_qe()
332 return (void *)(hwq->pbl_ptr[pg_num] + hwq->element_size * pg_idx); in bnxt_qplib_get_qe()
335 static inline void *bnxt_qplib_get_prod_qe(struct bnxt_qplib_hwq *hwq, u32 idx) in bnxt_qplib_get_prod_qe() argument
337 idx += hwq->prod; in bnxt_qplib_get_prod_qe()
338 if (idx >= hwq->depth) in bnxt_qplib_get_prod_qe()
339 idx -= hwq->depth; in bnxt_qplib_get_prod_qe()
340 return bnxt_qplib_get_qe(hwq, idx, NULL); in bnxt_qplib_get_prod_qe()
350 struct bnxt_qplib_hwq *hwq);
351 int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,
377 static inline void bnxt_qplib_hwq_incr_prod(struct bnxt_qplib_hwq *hwq, u32 cnt) in bnxt_qplib_hwq_incr_prod() argument
379 hwq->prod = (hwq->prod + cnt) % hwq->depth; in bnxt_qplib_hwq_incr_prod()
382 static inline void bnxt_qplib_hwq_incr_cons(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_hwq_incr_cons() argument
385 hwq->cons = (hwq->cons + cnt) % hwq->depth; in bnxt_qplib_hwq_incr_cons()
393 key = info->hwq->cons & (info->hwq->max_elements - 1); in bnxt_qplib_ring_db32()
408 key |= (info->hwq->cons & (info->hwq->max_elements - 1)) & in bnxt_qplib_ring_db()
420 key |= ((info->hwq->prod / info->max_slot)) & DBC_DBC_INDEX_MASK; in bnxt_qplib_ring_prod_db()