Lines Matching defs:io_cq

37 	struct ena_com_io_cq *io_cq)
43 head_masked = io_cq->head & (io_cq->q_depth - 1);
44 expected_phase = io_cq->phase;
46 cdesc = (struct ena_eth_io_rx_cdesc_base *)(io_cq->cdesc_addr.virt_addr
47 + (head_masked * io_cq->cdesc_entry_size_in_bytes));
255 ena_com_rx_cdesc_idx_to_ptr(struct ena_com_io_cq *io_cq, u16 idx)
257 idx &= (io_cq->q_depth - 1);
259 ((uintptr_t)io_cq->cdesc_addr.virt_addr +
260 idx * io_cq->cdesc_entry_size_in_bytes);
263 static u16 ena_com_cdesc_rx_pkt_get(struct ena_com_io_cq *io_cq,
271 cdesc = ena_com_get_next_rx_cdesc(io_cq);
275 ena_com_cq_inc_head(io_cq);
282 *first_cdesc_idx = io_cq->cur_rx_pkt_cdesc_start_idx;
283 count += io_cq->cur_rx_pkt_cdesc_count;
285 head_masked = io_cq->head & (io_cq->q_depth - 1);
287 io_cq->cur_rx_pkt_cdesc_count = 0;
288 io_cq->cur_rx_pkt_cdesc_start_idx = head_masked;
290 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq),
292 io_cq->qid, *first_cdesc_idx, count);
294 io_cq->cur_rx_pkt_cdesc_count += count;
376 static void ena_com_rx_set_flags(struct ena_com_io_cq *io_cq,
399 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq),
576 int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
582 u16 q_depth = io_cq->q_depth;
587 ENA_WARN(io_cq->direction != ENA_COM_IO_QUEUE_DIRECTION_RX,
588 ena_com_io_cq_to_ena_dev(io_cq), "wrong Q type");
590 nb_hw_desc = ena_com_cdesc_rx_pkt_get(io_cq, &cdesc_idx);
596 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq),
598 io_cq->qid, nb_hw_desc);
601 ena_trc_err(ena_com_io_cq_to_ena_dev(io_cq),
607 cdesc = ena_com_rx_cdesc_idx_to_ptr(io_cq, cdesc_idx);
619 cdesc = ena_com_rx_cdesc_idx_to_ptr(io_cq, cdesc_idx + i);
626 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq),
631 ena_com_rx_set_flags(io_cq, ena_rx_ctx, cdesc);
676 bool ena_com_cq_empty(struct ena_com_io_cq *io_cq)
680 cdesc = ena_com_get_next_rx_cdesc(io_cq);