Lines Matching refs:io_cq

37 	struct ena_com_io_cq *io_cq)  in ena_com_get_next_rx_cdesc()  argument
43 head_masked = io_cq->head & (io_cq->q_depth - 1); in ena_com_get_next_rx_cdesc()
44 expected_phase = io_cq->phase; in ena_com_get_next_rx_cdesc()
46 cdesc = (struct ena_eth_io_rx_cdesc_base *)(io_cq->cdesc_addr.virt_addr in ena_com_get_next_rx_cdesc()
47 + (head_masked * io_cq->cdesc_entry_size_in_bytes)); in ena_com_get_next_rx_cdesc()
261 ena_com_rx_cdesc_idx_to_ptr(struct ena_com_io_cq *io_cq, u16 idx) in ena_com_rx_cdesc_idx_to_ptr() argument
263 idx &= (io_cq->q_depth - 1); in ena_com_rx_cdesc_idx_to_ptr()
265 ((uintptr_t)io_cq->cdesc_addr.virt_addr + in ena_com_rx_cdesc_idx_to_ptr()
266 idx * io_cq->cdesc_entry_size_in_bytes); in ena_com_rx_cdesc_idx_to_ptr()
269 static int ena_com_cdesc_rx_pkt_get(struct ena_com_io_cq *io_cq, in ena_com_cdesc_rx_pkt_get() argument
273 struct ena_com_dev *dev = ena_com_io_cq_to_ena_dev(io_cq); in ena_com_cdesc_rx_pkt_get()
274 u16 count = io_cq->cur_rx_pkt_cdesc_count, head_masked; in ena_com_cdesc_rx_pkt_get()
281 cdesc = ena_com_get_next_rx_cdesc(io_cq); in ena_com_cdesc_rx_pkt_get()
286 ena_com_cq_inc_head(io_cq); in ena_com_cdesc_rx_pkt_get()
291 count, io_cq->qid, cdesc->req_id); in ena_com_cdesc_rx_pkt_get()
300 count, io_cq->qid, cdesc->req_id); in ena_com_cdesc_rx_pkt_get()
310 *first_cdesc_idx = io_cq->cur_rx_pkt_cdesc_start_idx; in ena_com_cdesc_rx_pkt_get()
312 head_masked = io_cq->head & (io_cq->q_depth - 1); in ena_com_cdesc_rx_pkt_get()
315 io_cq->cur_rx_pkt_cdesc_count = 0; in ena_com_cdesc_rx_pkt_get()
316 io_cq->cur_rx_pkt_cdesc_start_idx = head_masked; in ena_com_cdesc_rx_pkt_get()
318 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq), in ena_com_cdesc_rx_pkt_get()
320 io_cq->qid, *first_cdesc_idx, count); in ena_com_cdesc_rx_pkt_get()
322 io_cq->cur_rx_pkt_cdesc_count = count; in ena_com_cdesc_rx_pkt_get()
401 static void ena_com_rx_set_flags(struct ena_com_io_cq *io_cq, in ena_com_rx_set_flags() argument
424 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq), in ena_com_rx_set_flags()
598 int ena_com_rx_pkt(struct ena_com_io_cq *io_cq, in ena_com_rx_pkt() argument
604 u16 q_depth = io_cq->q_depth; in ena_com_rx_pkt()
610 ENA_WARN(io_cq->direction != ENA_COM_IO_QUEUE_DIRECTION_RX, in ena_com_rx_pkt()
611 ena_com_io_cq_to_ena_dev(io_cq), "wrong Q type"); in ena_com_rx_pkt()
613 rc = ena_com_cdesc_rx_pkt_get(io_cq, &cdesc_idx, &nb_hw_desc); in ena_com_rx_pkt()
622 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq), in ena_com_rx_pkt()
624 io_cq->qid, nb_hw_desc); in ena_com_rx_pkt()
627 ena_trc_err(ena_com_io_cq_to_ena_dev(io_cq), in ena_com_rx_pkt()
633 cdesc = ena_com_rx_cdesc_idx_to_ptr(io_cq, cdesc_idx); in ena_com_rx_pkt()
645 cdesc = ena_com_rx_cdesc_idx_to_ptr(io_cq, cdesc_idx + i); in ena_com_rx_pkt()
652 ena_trc_dbg(ena_com_io_cq_to_ena_dev(io_cq), in ena_com_rx_pkt()
657 ena_com_rx_set_flags(io_cq, ena_rx_ctx, cdesc); in ena_com_rx_pkt()
701 bool ena_com_cq_empty(struct ena_com_io_cq *io_cq) in ena_com_cq_empty() argument
705 cdesc = ena_com_get_next_rx_cdesc(io_cq); in ena_com_cq_empty()