Lines Matching defs:wq

25  * $FreeBSD: stable/11/sys/dev/mlx5/mlx5_core/wq.h 341958 2018-12-12 12:46:12Z hselasky $
84 void *wqc, struct mlx5_wq_cyc *wq,
86 u32 mlx5_wq_cyc_get_size(struct mlx5_wq_cyc *wq);
89 void *cqc, struct mlx5_cqwq *wq,
91 u32 mlx5_cqwq_get_size(struct mlx5_cqwq *wq);
94 void *wqc, struct mlx5_wq_ll *wq,
96 u32 mlx5_wq_ll_get_size(struct mlx5_wq_ll *wq);
100 static inline u16 mlx5_wq_cyc_ctr2ix(struct mlx5_wq_cyc *wq, u16 ctr)
102 return ctr & wq->sz_m1;
105 static inline void *mlx5_wq_cyc_get_wqe(struct mlx5_wq_cyc *wq, u16 ix)
107 return wq->buf + (ix << wq->log_stride);
118 static inline u32 mlx5_cqwq_get_ci(struct mlx5_cqwq *wq)
120 return wq->cc & wq->sz_m1;
123 static inline void *mlx5_cqwq_get_wqe(struct mlx5_cqwq *wq, u32 ix)
125 return wq->buf + (ix << wq->log_stride);
128 static inline u32 mlx5_cqwq_get_wrap_cnt(struct mlx5_cqwq *wq)
130 return wq->cc >> wq->log_sz;
133 static inline void mlx5_cqwq_pop(struct mlx5_cqwq *wq)
135 wq->cc++;
138 static inline void mlx5_cqwq_update_db_record(struct mlx5_cqwq *wq)
140 *wq->db = cpu_to_be32(wq->cc & 0xffffff);
143 static inline int mlx5_wq_ll_is_full(struct mlx5_wq_ll *wq)
145 return wq->cur_sz == wq->sz_m1;
148 static inline int mlx5_wq_ll_is_empty(struct mlx5_wq_ll *wq)
150 return !wq->cur_sz;
153 static inline void mlx5_wq_ll_push(struct mlx5_wq_ll *wq, u16 head_next)
155 wq->head = head_next;
156 wq->wqe_ctr++;
157 wq->cur_sz++;
160 static inline void mlx5_wq_ll_pop(struct mlx5_wq_ll *wq, __be16 ix,
163 *wq->tail_next = ix;
164 wq->tail_next = next_tail_next;
165 wq->cur_sz--;
167 static inline void mlx5_wq_ll_update_db_record(struct mlx5_wq_ll *wq)
169 *wq->db = cpu_to_be32(wq->wqe_ctr);
172 static inline void *mlx5_wq_ll_get_wqe(struct mlx5_wq_ll *wq, u16 ix)
174 return wq->buf + (ix << wq->log_stride);