Lines Matching refs:io_cq

9 	struct ena_com_io_cq *io_cq)
15 head_masked = io_cq->head & (io_cq->q_depth - 1);
16 expected_phase = io_cq->phase;
18 cdesc = (struct ena_eth_io_rx_cdesc_base *)(io_cq->cdesc_addr.virt_addr
19 + (head_masked * io_cq->cdesc_entry_size_in_bytes));
224 ena_com_rx_cdesc_idx_to_ptr(struct ena_com_io_cq *io_cq, u16 idx)
226 idx &= (io_cq->q_depth - 1);
228 ((uintptr_t)io_cq->cdesc_addr.virt_addr +
229 idx * io_cq->cdesc_entry_size_in_bytes);
232 static int ena_com_cdesc_rx_pkt_get(struct ena_com_io_cq *io_cq,
236 u16 count = io_cq->cur_rx_pkt_cdesc_count, head_masked;
243 cdesc = ena_com_get_next_rx_cdesc(io_cq);
248 ena_com_cq_inc_head(io_cq);
251 struct ena_com_dev *dev = ena_com_io_cq_to_ena_dev(io_cq);
255 count, io_cq->qid, cdesc->req_id);
264 *first_cdesc_idx = io_cq->cur_rx_pkt_cdesc_start_idx;
266 head_masked = io_cq->head & (io_cq->q_depth - 1);
269 io_cq->cur_rx_pkt_cdesc_count = 0;
270 io_cq->cur_rx_pkt_cdesc_start_idx = head_masked;
272 netdev_dbg(ena_com_io_cq_to_ena_dev(io_cq)->net_device,
274 io_cq->qid, *first_cdesc_idx, count);
276 io_cq->cur_rx_pkt_cdesc_count = count;
355 static void ena_com_rx_set_flags(struct ena_com_io_cq *io_cq,
378 netdev_dbg(ena_com_io_cq_to_ena_dev(io_cq)->net_device,
545 int ena_com_rx_pkt(struct ena_com_io_cq *io_cq,
551 u16 q_depth = io_cq->q_depth;
557 WARN(io_cq->direction != ENA_COM_IO_QUEUE_DIRECTION_RX, "wrong Q type");
559 rc = ena_com_cdesc_rx_pkt_get(io_cq, &cdesc_idx, &nb_hw_desc);
568 netdev_dbg(ena_com_io_cq_to_ena_dev(io_cq)->net_device,
569 "Fetch rx packet: queue %d completed desc: %d\n", io_cq->qid, nb_hw_desc);
572 netdev_err(ena_com_io_cq_to_ena_dev(io_cq)->net_device,
577 cdesc = ena_com_rx_cdesc_idx_to_ptr(io_cq, cdesc_idx);
589 cdesc = ena_com_rx_cdesc_idx_to_ptr(io_cq, cdesc_idx + i);
596 netdev_dbg(ena_com_io_cq_to_ena_dev(io_cq)->net_device,
601 ena_com_rx_set_flags(io_cq, ena_rx_ctx, cdesc);
645 bool ena_com_cq_empty(struct ena_com_io_cq *io_cq)
649 cdesc = ena_com_get_next_rx_cdesc(io_cq);