-uint32_t
-ionic_q_space_avail(struct ionic_queue *q)
-{
- uint32_t avail = q->tail_idx;
-
- if (q->head_idx >= avail)
- avail += q->num_descs - q->head_idx - 1;
- else
- avail -= q->head_idx + 1;
-
- return avail;
-}
-
-bool
-ionic_q_has_space(struct ionic_queue *q, uint32_t want)
-{
- return ionic_q_space_avail(q) >= want;
-}
-