• Home
  • Raw
  • Download

Lines Matching refs:hwq

66 #define HWQ_CMP(idx, hwq)	((idx) & ((hwq)->max_elements - 1))  argument
68 #define HWQ_FREE_SLOTS(hwq) (hwq->max_elements - \ argument
69 ((HWQ_CMP(hwq->prod, hwq)\
70 - HWQ_CMP(hwq->cons, hwq))\
71 & (hwq->max_elements - 1)))
168 struct bnxt_qplib_hwq *hwq; member
286 static inline u8 bnxt_qplib_base_pg_size(struct bnxt_qplib_hwq *hwq) in bnxt_qplib_base_pg_size() argument
291 pbl = &hwq->pbl[PBL_LVL_0]; in bnxt_qplib_base_pg_size()
318 static inline void *bnxt_qplib_get_qe(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_get_qe() argument
323 pg_num = (indx / hwq->qe_ppg); in bnxt_qplib_get_qe()
324 pg_idx = (indx % hwq->qe_ppg); in bnxt_qplib_get_qe()
326 *pg = (u64)&hwq->pbl_ptr[pg_num]; in bnxt_qplib_get_qe()
327 return (void *)(hwq->pbl_ptr[pg_num] + hwq->element_size * pg_idx); in bnxt_qplib_get_qe()
330 static inline void *bnxt_qplib_get_prod_qe(struct bnxt_qplib_hwq *hwq, u32 idx) in bnxt_qplib_get_prod_qe() argument
332 idx += hwq->prod; in bnxt_qplib_get_prod_qe()
333 if (idx >= hwq->depth) in bnxt_qplib_get_prod_qe()
334 idx -= hwq->depth; in bnxt_qplib_get_prod_qe()
335 return bnxt_qplib_get_qe(hwq, idx, NULL); in bnxt_qplib_get_prod_qe()
345 struct bnxt_qplib_hwq *hwq);
346 int bnxt_qplib_alloc_init_hwq(struct bnxt_qplib_hwq *hwq,
373 static inline void bnxt_qplib_hwq_incr_prod(struct bnxt_qplib_hwq *hwq, u32 cnt) in bnxt_qplib_hwq_incr_prod() argument
375 hwq->prod = (hwq->prod + cnt) % hwq->depth; in bnxt_qplib_hwq_incr_prod()
378 static inline void bnxt_qplib_hwq_incr_cons(struct bnxt_qplib_hwq *hwq, in bnxt_qplib_hwq_incr_cons() argument
381 hwq->cons = (hwq->cons + cnt) % hwq->depth; in bnxt_qplib_hwq_incr_cons()
389 key = info->hwq->cons & (info->hwq->max_elements - 1); in bnxt_qplib_ring_db32()
404 key |= (info->hwq->cons & (info->hwq->max_elements - 1)) & in bnxt_qplib_ring_db()
416 key |= ((info->hwq->prod / info->max_slot)) & DBC_DBC_INDEX_MASK; in bnxt_qplib_ring_prod_db()