Lines Matching refs:wr

672 static int siw_sq_flush_wr(struct siw_qp *qp, const struct ib_send_wr *wr,  in siw_sq_flush_wr()  argument
678 while (wr) { in siw_sq_flush_wr()
679 sqe.id = wr->wr_id; in siw_sq_flush_wr()
680 sqe.opcode = wr->opcode; in siw_sq_flush_wr()
684 *bad_wr = wr; in siw_sq_flush_wr()
687 wr = wr->next; in siw_sq_flush_wr()
693 static int siw_rq_flush_wr(struct siw_qp *qp, const struct ib_recv_wr *wr, in siw_rq_flush_wr() argument
699 while (wr) { in siw_rq_flush_wr()
700 rqe.id = wr->wr_id; in siw_rq_flush_wr()
704 *bad_wr = wr; in siw_rq_flush_wr()
707 wr = wr->next; in siw_rq_flush_wr()
721 int siw_post_send(struct ib_qp *base_qp, const struct ib_send_wr *wr, in siw_post_send() argument
730 if (wr && !rdma_is_kernel_res(&qp->base_qp.res)) { in siw_post_send()
732 *bad_wr = wr; in siw_post_send()
751 rv = siw_sq_flush_wr(qp, wr, bad_wr); in siw_post_send()
755 *bad_wr = wr; in siw_post_send()
769 rv = siw_sq_flush_wr(qp, wr, bad_wr); in siw_post_send()
773 *bad_wr = wr; in siw_post_send()
781 while (wr) { in siw_post_send()
790 if (wr->num_sge > qp->attrs.sq_max_sges) { in siw_post_send()
791 siw_dbg_qp(qp, "too many sge's: %d\n", wr->num_sge); in siw_post_send()
795 sqe->id = wr->wr_id; in siw_post_send()
797 if ((wr->send_flags & IB_SEND_SIGNALED) || in siw_post_send()
801 if (wr->send_flags & IB_SEND_FENCE) in siw_post_send()
804 switch (wr->opcode) { in siw_post_send()
807 if (wr->send_flags & IB_SEND_SOLICITED) in siw_post_send()
810 if (!(wr->send_flags & IB_SEND_INLINE)) { in siw_post_send()
811 siw_copy_sgl(wr->sg_list, sqe->sge, in siw_post_send()
812 wr->num_sge); in siw_post_send()
813 sqe->num_sge = wr->num_sge; in siw_post_send()
815 rv = siw_copy_inline_sgl(wr, sqe); in siw_post_send()
823 if (wr->opcode == IB_WR_SEND) in siw_post_send()
827 sqe->rkey = wr->ex.invalidate_rkey; in siw_post_send()
840 if (unlikely(wr->num_sge != 1)) { in siw_post_send()
844 siw_copy_sgl(wr->sg_list, &sqe->sge[0], 1); in siw_post_send()
848 sqe->raddr = rdma_wr(wr)->remote_addr; in siw_post_send()
849 sqe->rkey = rdma_wr(wr)->rkey; in siw_post_send()
852 if (wr->opcode == IB_WR_RDMA_READ) in siw_post_send()
859 if (!(wr->send_flags & IB_SEND_INLINE)) { in siw_post_send()
860 siw_copy_sgl(wr->sg_list, &sqe->sge[0], in siw_post_send()
861 wr->num_sge); in siw_post_send()
862 sqe->num_sge = wr->num_sge; in siw_post_send()
864 rv = siw_copy_inline_sgl(wr, sqe); in siw_post_send()
872 sqe->raddr = rdma_wr(wr)->remote_addr; in siw_post_send()
873 sqe->rkey = rdma_wr(wr)->rkey; in siw_post_send()
878 sqe->base_mr = (uintptr_t)reg_wr(wr)->mr; in siw_post_send()
879 sqe->rkey = reg_wr(wr)->key; in siw_post_send()
880 sqe->access = reg_wr(wr)->access & IWARP_ACCESS_MASK; in siw_post_send()
885 sqe->rkey = wr->ex.invalidate_rkey; in siw_post_send()
891 wr->opcode); in siw_post_send()
907 wr = wr->next; in siw_post_send()
948 *bad_wr = wr; in siw_post_send()
961 int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr, in siw_post_receive() argument
969 *bad_wr = wr; in siw_post_receive()
974 *bad_wr = wr; in siw_post_receive()
993 rv = siw_rq_flush_wr(qp, wr, bad_wr); in siw_post_receive()
997 *bad_wr = wr; in siw_post_receive()
1011 rv = siw_rq_flush_wr(qp, wr, bad_wr); in siw_post_receive()
1015 *bad_wr = wr; in siw_post_receive()
1027 while (wr) { in siw_post_receive()
1036 if (wr->num_sge > qp->attrs.rq_max_sges) { in siw_post_receive()
1037 siw_dbg_qp(qp, "too many sge's: %d\n", wr->num_sge); in siw_post_receive()
1041 rqe->id = wr->wr_id; in siw_post_receive()
1042 rqe->num_sge = wr->num_sge; in siw_post_receive()
1043 siw_copy_sgl(wr->sg_list, rqe->sge, wr->num_sge); in siw_post_receive()
1051 wr = wr->next; in siw_post_receive()
1059 *bad_wr = wr; in siw_post_receive()
1727 int siw_post_srq_recv(struct ib_srq *base_srq, const struct ib_recv_wr *wr, in siw_post_srq_recv() argument
1747 while (wr) { in siw_post_srq_recv()
1756 if (unlikely(wr->num_sge > srq->max_sge)) { in siw_post_srq_recv()
1758 "[SRQ]: too many sge's: %d\n", wr->num_sge); in siw_post_srq_recv()
1762 rqe->id = wr->wr_id; in siw_post_srq_recv()
1763 rqe->num_sge = wr->num_sge; in siw_post_srq_recv()
1764 siw_copy_sgl(wr->sg_list, rqe->sge, wr->num_sge); in siw_post_srq_recv()
1772 wr = wr->next; in siw_post_srq_recv()
1778 *bad_wr = wr; in siw_post_srq_recv()