Lines Matching refs:wqe_idx

63 	u32 wqe_idx;  in irdma_nop_1()  local
69 wqe_idx = IRDMA_RING_CURRENT_HEAD(qp->sq_ring); in irdma_nop_1()
70 wqe = qp->sq_base[wqe_idx].elem; in irdma_nop_1()
72 qp->sq_wrtrk_array[wqe_idx].quanta = IRDMA_QP_WQE_MIN_QUANTA; in irdma_nop_1()
98 u32 wqe_idx; in irdma_clr_wqes() local
101 wqe_idx = (qp_wqe_idx + 128) % qp->sq_ring.size; in irdma_clr_wqes()
102 wqe = qp->sq_base[wqe_idx].elem; in irdma_clr_wqes()
103 if (wqe_idx) in irdma_clr_wqes()
153 static void irdma_qp_ring_push_db(struct irdma_qp_uk *qp, u32 wqe_idx) in irdma_qp_ring_push_db() argument
156 FIELD_PREP(IRDMA_WQEALLOC_WQE_DESC_INDEX, wqe_idx >> 3) | qp->qp_id); in irdma_qp_ring_push_db()
163 u32 wqe_idx, bool post_sq) in irdma_qp_push_wqe() argument
174 (wqe_idx & 0x7) * 0x20); in irdma_qp_push_wqe()
176 irdma_qp_ring_push_db(qp, wqe_idx); in irdma_qp_push_wqe()
188 __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx, in irdma_qp_get_next_send_wqe() argument
221 *wqe_idx = IRDMA_RING_CURRENT_HEAD(qp->sq_ring); in irdma_qp_get_next_send_wqe()
222 if (!*wqe_idx) in irdma_qp_get_next_send_wqe()
227 wqe = qp->sq_base[*wqe_idx].elem; in irdma_qp_get_next_send_wqe()
233 qp->sq_wrtrk_array[*wqe_idx].wrid = info->wr_id; in irdma_qp_get_next_send_wqe()
234 qp->sq_wrtrk_array[*wqe_idx].wr_len = total_size; in irdma_qp_get_next_send_wqe()
235 qp->sq_wrtrk_array[*wqe_idx].quanta = quanta; in irdma_qp_get_next_send_wqe()
245 __le64 *irdma_qp_get_next_recv_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx) in irdma_qp_get_next_recv_wqe() argument
253 IRDMA_ATOMIC_RING_MOVE_HEAD(qp->rq_ring, *wqe_idx, ret_code); in irdma_qp_get_next_recv_wqe()
257 if (!*wqe_idx) in irdma_qp_get_next_recv_wqe()
260 wqe = qp->rq_base[*wqe_idx * qp->rq_wqe_size_multiplier].elem; in irdma_qp_get_next_recv_wqe()
278 u32 i, wqe_idx; in irdma_uk_rdma_write() local
305 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_rdma_write()
310 irdma_clr_wqes(qp, wqe_idx); in irdma_uk_rdma_write()
357 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_rdma_write()
383 u32 wqe_idx; in irdma_uk_rdma_read() local
400 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_rdma_read()
405 irdma_clr_wqes(qp, wqe_idx); in irdma_uk_rdma_read()
445 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_rdma_read()
467 u32 i, wqe_idx, total_size = 0, byte_off; in irdma_uk_send() local
490 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_send()
495 irdma_clr_wqes(qp, wqe_idx); in irdma_uk_send()
546 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_send()
688 u32 wqe_idx; in irdma_uk_inline_rdma_write() local
699 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, op_info->len, in irdma_uk_inline_rdma_write()
704 irdma_clr_wqes(qp, wqe_idx); in irdma_uk_inline_rdma_write()
733 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_inline_rdma_write()
755 u32 wqe_idx; in irdma_uk_inline_send() local
766 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, op_info->len, in irdma_uk_inline_send()
771 irdma_clr_wqes(qp, wqe_idx); in irdma_uk_inline_send()
805 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_inline_send()
827 u32 wqe_idx; in irdma_uk_stag_local_invalidate() local
835 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, IRDMA_QP_WQE_MIN_QUANTA, in irdma_uk_stag_local_invalidate()
840 irdma_clr_wqes(qp, wqe_idx); in irdma_uk_stag_local_invalidate()
859 irdma_qp_push_wqe(qp, wqe, IRDMA_QP_WQE_MIN_QUANTA, wqe_idx, in irdma_uk_stag_local_invalidate()
877 u32 wqe_idx, i, byte_off; in irdma_uk_post_receive() local
885 wqe = irdma_qp_get_next_recv_wqe(qp, &wqe_idx); in irdma_uk_post_receive()
889 qp->rq_wrid_array[wqe_idx] = info->wr_id; in irdma_uk_post_receive()
1010 u32 wqe_idx, q_type; in irdma_uk_cq_poll_cmpl() local
1118 wqe_idx = (u32)FIELD_GET(IRDMA_CQ_WQEIDX, qword3); in irdma_uk_cq_poll_cmpl()
1124 array_idx = wqe_idx / qp->rq_wqe_size_multiplier; in irdma_uk_cq_poll_cmpl()
1162 if (wqe_idx + 1 >= qp->conn_wqes) in irdma_uk_cq_poll_cmpl()
1165 if (wqe_idx < qp->conn_wqes && qp->sq_ring.head == qp->sq_ring.tail) { in irdma_uk_cq_poll_cmpl()
1181 info->wr_id = qp->sq_wrtrk_array[wqe_idx].wrid; in irdma_uk_cq_poll_cmpl()
1183 info->bytes_xfered = qp->sq_wrtrk_array[wqe_idx].wr_len; in irdma_uk_cq_poll_cmpl()
1186 wqe_idx + qp->sq_wrtrk_array[wqe_idx].quanta); in irdma_uk_cq_poll_cmpl()
1510 u32 wqe_idx; in irdma_nop() local
1515 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, IRDMA_QP_WQE_MIN_QUANTA, in irdma_nop()
1520 irdma_clr_wqes(qp, wqe_idx); in irdma_nop()