Lines Matching refs:wqe

15 static void irdma_set_fragment(__le64 *wqe, u32 offset, struct ib_sge *sge,  in irdma_set_fragment()  argument
19 set_64bit_val(wqe, offset, in irdma_set_fragment()
21 set_64bit_val(wqe, offset + 8, in irdma_set_fragment()
26 set_64bit_val(wqe, offset, 0); in irdma_set_fragment()
27 set_64bit_val(wqe, offset + 8, in irdma_set_fragment()
39 static void irdma_set_fragment_gen_1(__le64 *wqe, u32 offset, in irdma_set_fragment_gen_1() argument
43 set_64bit_val(wqe, offset, in irdma_set_fragment_gen_1()
45 set_64bit_val(wqe, offset + 8, in irdma_set_fragment_gen_1()
49 set_64bit_val(wqe, offset, 0); in irdma_set_fragment_gen_1()
50 set_64bit_val(wqe, offset + 8, 0); in irdma_set_fragment_gen_1()
61 __le64 *wqe; in irdma_nop_1() local
69 wqe = qp->sq_base[wqe_idx].elem; in irdma_nop_1()
73 set_64bit_val(wqe, 0, 0); in irdma_nop_1()
74 set_64bit_val(wqe, 8, 0); in irdma_nop_1()
75 set_64bit_val(wqe, 16, 0); in irdma_nop_1()
84 set_64bit_val(wqe, 24, hdr); in irdma_nop_1()
96 __le64 *wqe; in irdma_clr_wqes() local
101 wqe = qp->sq_base[wqe_idx].elem; in irdma_clr_wqes()
103 memset(wqe, qp->swqe_polarity ? 0 : 0xFF, 0x1000); in irdma_clr_wqes()
105 memset(wqe, qp->swqe_polarity ? 0xFF : 0, 0x1000); in irdma_clr_wqes()
161 void irdma_qp_push_wqe(struct irdma_qp_uk *qp, __le64 *wqe, u16 quanta, in irdma_qp_push_wqe() argument
174 memcpy(push, wqe, quanta * IRDMA_QP_WQE_MIN_SIZE); in irdma_qp_push_wqe()
191 __le64 *wqe; in irdma_qp_get_next_send_wqe() local
226 wqe = qp->sq_base[*wqe_idx].elem; in irdma_qp_get_next_send_wqe()
236 return wqe; in irdma_qp_get_next_send_wqe()
246 __le64 *wqe; in irdma_qp_get_next_recv_wqe() local
259 wqe = qp->rq_base[*wqe_idx * qp->rq_wqe_size_multiplier].elem; in irdma_qp_get_next_recv_wqe()
261 return wqe; in irdma_qp_get_next_recv_wqe()
274 __le64 *wqe; in irdma_uk_rdma_write() local
303 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_rdma_write()
305 if (!wqe) in irdma_uk_rdma_write()
310 set_64bit_val(wqe, 16, in irdma_uk_rdma_write()
314 set_64bit_val(wqe, 0, in irdma_uk_rdma_write()
318 qp->wqe_ops.iw_set_fragment(wqe, 0, in irdma_uk_rdma_write()
325 qp->wqe_ops.iw_set_fragment(wqe, byte_off, in irdma_uk_rdma_write()
334 qp->wqe_ops.iw_set_fragment(wqe, byte_off, NULL, in irdma_uk_rdma_write()
353 set_64bit_val(wqe, 24, hdr); in irdma_uk_rdma_write()
355 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_rdma_write()
379 __le64 *wqe; in irdma_uk_rdma_read() local
397 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_rdma_read()
399 if (!wqe) in irdma_uk_rdma_read()
408 qp->wqe_ops.iw_set_fragment(wqe, 0, op_info->lo_sg_list, in irdma_uk_rdma_read()
411 qp->wqe_ops.iw_set_fragment(wqe, byte_off, in irdma_uk_rdma_read()
420 qp->wqe_ops.iw_set_fragment(wqe, byte_off, NULL, in irdma_uk_rdma_read()
425 set_64bit_val(wqe, 16, in irdma_uk_rdma_read()
440 set_64bit_val(wqe, 24, hdr); in irdma_uk_rdma_read()
442 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_rdma_read()
460 __le64 *wqe; in irdma_uk_send() local
486 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_send()
488 if (!wqe) in irdma_uk_send()
496 set_64bit_val(wqe, 0, in irdma_uk_send()
500 qp->wqe_ops.iw_set_fragment(wqe, 0, in irdma_uk_send()
507 qp->wqe_ops.iw_set_fragment(wqe, byte_off, &op_info->sg_list[i], in irdma_uk_send()
515 qp->wqe_ops.iw_set_fragment(wqe, byte_off, NULL, in irdma_uk_send()
521 set_64bit_val(wqe, 16, in irdma_uk_send()
541 set_64bit_val(wqe, 24, hdr); in irdma_uk_send()
543 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_send()
557 static void irdma_set_mw_bind_wqe_gen_1(__le64 *wqe, in irdma_set_mw_bind_wqe_gen_1() argument
560 set_64bit_val(wqe, 0, (uintptr_t)op_info->va); in irdma_set_mw_bind_wqe_gen_1()
561 set_64bit_val(wqe, 8, in irdma_set_mw_bind_wqe_gen_1()
564 set_64bit_val(wqe, 16, op_info->bind_len); in irdma_set_mw_bind_wqe_gen_1()
574 static void irdma_copy_inline_data_gen_1(u8 *wqe, struct ib_sge *sge_list, in irdma_copy_inline_data_gen_1() argument
588 memcpy(wqe, cur_sge, bytes_copied); in irdma_copy_inline_data_gen_1()
589 wqe += bytes_copied; in irdma_copy_inline_data_gen_1()
596 wqe += 16; in irdma_copy_inline_data_gen_1()
619 static void irdma_set_mw_bind_wqe(__le64 *wqe, in irdma_set_mw_bind_wqe() argument
622 set_64bit_val(wqe, 0, (uintptr_t)op_info->va); in irdma_set_mw_bind_wqe()
623 set_64bit_val(wqe, 8, in irdma_set_mw_bind_wqe()
626 set_64bit_val(wqe, 16, op_info->bind_len); in irdma_set_mw_bind_wqe()
636 static void irdma_copy_inline_data(u8 *wqe, struct ib_sge *sge_list, in irdma_copy_inline_data() argument
644 wqe += 8; in irdma_copy_inline_data()
654 memcpy(wqe, cur_sge, bytes_copied); in irdma_copy_inline_data()
655 wqe += bytes_copied; in irdma_copy_inline_data()
666 wqe += 16; in irdma_copy_inline_data()
668 *wqe = inline_valid; in irdma_copy_inline_data()
669 wqe++; in irdma_copy_inline_data()
675 *(wqe + quanta_bytes_remaining) = inline_valid; in irdma_copy_inline_data()
713 __le64 *wqe; in irdma_uk_inline_rdma_write() local
734 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_inline_rdma_write()
736 if (!wqe) in irdma_uk_inline_rdma_write()
742 set_64bit_val(wqe, 16, in irdma_uk_inline_rdma_write()
758 set_64bit_val(wqe, 0, in irdma_uk_inline_rdma_write()
761 qp->wqe_ops.iw_copy_inline_data((u8 *)wqe, op_info->lo_sg_list, in irdma_uk_inline_rdma_write()
766 set_64bit_val(wqe, 24, hdr); in irdma_uk_inline_rdma_write()
769 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_inline_rdma_write()
787 __le64 *wqe; in irdma_uk_inline_send() local
808 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, quanta, total_size, in irdma_uk_inline_send()
810 if (!wqe) in irdma_uk_inline_send()
815 set_64bit_val(wqe, 16, in irdma_uk_inline_send()
837 set_64bit_val(wqe, 0, in irdma_uk_inline_send()
839 qp->wqe_ops.iw_copy_inline_data((u8 *)wqe, op_info->sg_list, in irdma_uk_inline_send()
844 set_64bit_val(wqe, 24, hdr); in irdma_uk_inline_send()
847 irdma_qp_push_wqe(qp, wqe, quanta, wqe_idx, post_sq); in irdma_uk_inline_send()
866 __le64 *wqe; in irdma_uk_stag_local_invalidate() local
877 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, IRDMA_QP_WQE_MIN_QUANTA, in irdma_uk_stag_local_invalidate()
879 if (!wqe) in irdma_uk_stag_local_invalidate()
885 qp->wqe_ops.iw_set_fragment(wqe, 0, &sge, 0); in irdma_uk_stag_local_invalidate()
887 set_64bit_val(wqe, 16, 0); in irdma_uk_stag_local_invalidate()
898 set_64bit_val(wqe, 24, hdr); in irdma_uk_stag_local_invalidate()
901 irdma_qp_push_wqe(qp, wqe, IRDMA_QP_WQE_MIN_QUANTA, wqe_idx, in irdma_uk_stag_local_invalidate()
921 __le64 *wqe; in irdma_uk_post_receive() local
927 wqe = irdma_qp_get_next_recv_wqe(qp, &wqe_idx); in irdma_uk_post_receive()
928 if (!wqe) in irdma_uk_post_receive()
933 qp->wqe_ops.iw_set_fragment(wqe, 0, info->sg_list, in irdma_uk_post_receive()
937 qp->wqe_ops.iw_set_fragment(wqe, byte_off, &info->sg_list[i], in irdma_uk_post_receive()
945 qp->wqe_ops.iw_set_fragment(wqe, byte_off, NULL, in irdma_uk_post_receive()
951 set_64bit_val(wqe, 16, 0); in irdma_uk_post_receive()
957 set_64bit_val(wqe, 24, hdr); in irdma_uk_post_receive()
1547 __le64 *wqe; in irdma_nop() local
1554 wqe = irdma_qp_get_next_send_wqe(qp, &wqe_idx, IRDMA_QP_WQE_MIN_QUANTA, in irdma_nop()
1556 if (!wqe) in irdma_nop()
1561 set_64bit_val(wqe, 0, 0); in irdma_nop()
1562 set_64bit_val(wqe, 8, 0); in irdma_nop()
1563 set_64bit_val(wqe, 16, 0); in irdma_nop()
1571 set_64bit_val(wqe, 24, hdr); in irdma_nop()