Lines Matching refs:wr
670 static int siw_sq_flush_wr(struct siw_qp *qp, const struct ib_send_wr *wr, in siw_sq_flush_wr() argument
676 while (wr) { in siw_sq_flush_wr()
677 sqe.id = wr->wr_id; in siw_sq_flush_wr()
678 sqe.opcode = wr->opcode; in siw_sq_flush_wr()
682 *bad_wr = wr; in siw_sq_flush_wr()
685 wr = wr->next; in siw_sq_flush_wr()
691 static int siw_rq_flush_wr(struct siw_qp *qp, const struct ib_recv_wr *wr, in siw_rq_flush_wr() argument
697 while (wr) { in siw_rq_flush_wr()
698 rqe.id = wr->wr_id; in siw_rq_flush_wr()
702 *bad_wr = wr; in siw_rq_flush_wr()
705 wr = wr->next; in siw_rq_flush_wr()
719 int siw_post_send(struct ib_qp *base_qp, const struct ib_send_wr *wr, in siw_post_send() argument
728 if (wr && !rdma_is_kernel_res(&qp->base_qp.res)) { in siw_post_send()
730 *bad_wr = wr; in siw_post_send()
749 rv = siw_sq_flush_wr(qp, wr, bad_wr); in siw_post_send()
753 *bad_wr = wr; in siw_post_send()
767 rv = siw_sq_flush_wr(qp, wr, bad_wr); in siw_post_send()
771 *bad_wr = wr; in siw_post_send()
779 while (wr) { in siw_post_send()
788 if (wr->num_sge > qp->attrs.sq_max_sges) { in siw_post_send()
789 siw_dbg_qp(qp, "too many sge's: %d\n", wr->num_sge); in siw_post_send()
793 sqe->id = wr->wr_id; in siw_post_send()
795 if ((wr->send_flags & IB_SEND_SIGNALED) || in siw_post_send()
799 if (wr->send_flags & IB_SEND_FENCE) in siw_post_send()
802 switch (wr->opcode) { in siw_post_send()
805 if (wr->send_flags & IB_SEND_SOLICITED) in siw_post_send()
808 if (!(wr->send_flags & IB_SEND_INLINE)) { in siw_post_send()
809 siw_copy_sgl(wr->sg_list, sqe->sge, in siw_post_send()
810 wr->num_sge); in siw_post_send()
811 sqe->num_sge = wr->num_sge; in siw_post_send()
813 rv = siw_copy_inline_sgl(wr, sqe); in siw_post_send()
821 if (wr->opcode == IB_WR_SEND) in siw_post_send()
825 sqe->rkey = wr->ex.invalidate_rkey; in siw_post_send()
838 if (unlikely(wr->num_sge != 1)) { in siw_post_send()
842 siw_copy_sgl(wr->sg_list, &sqe->sge[0], 1); in siw_post_send()
846 sqe->raddr = rdma_wr(wr)->remote_addr; in siw_post_send()
847 sqe->rkey = rdma_wr(wr)->rkey; in siw_post_send()
850 if (wr->opcode == IB_WR_RDMA_READ) in siw_post_send()
857 if (!(wr->send_flags & IB_SEND_INLINE)) { in siw_post_send()
858 siw_copy_sgl(wr->sg_list, &sqe->sge[0], in siw_post_send()
859 wr->num_sge); in siw_post_send()
860 sqe->num_sge = wr->num_sge; in siw_post_send()
862 rv = siw_copy_inline_sgl(wr, sqe); in siw_post_send()
870 sqe->raddr = rdma_wr(wr)->remote_addr; in siw_post_send()
871 sqe->rkey = rdma_wr(wr)->rkey; in siw_post_send()
876 sqe->base_mr = (uintptr_t)reg_wr(wr)->mr; in siw_post_send()
877 sqe->rkey = reg_wr(wr)->key; in siw_post_send()
878 sqe->access = reg_wr(wr)->access & IWARP_ACCESS_MASK; in siw_post_send()
883 sqe->rkey = wr->ex.invalidate_rkey; in siw_post_send()
889 wr->opcode); in siw_post_send()
905 wr = wr->next; in siw_post_send()
946 *bad_wr = wr; in siw_post_send()
959 int siw_post_receive(struct ib_qp *base_qp, const struct ib_recv_wr *wr, in siw_post_receive() argument
967 *bad_wr = wr; in siw_post_receive()
972 *bad_wr = wr; in siw_post_receive()
991 rv = siw_rq_flush_wr(qp, wr, bad_wr); in siw_post_receive()
995 *bad_wr = wr; in siw_post_receive()
1009 rv = siw_rq_flush_wr(qp, wr, bad_wr); in siw_post_receive()
1013 *bad_wr = wr; in siw_post_receive()
1025 while (wr) { in siw_post_receive()
1034 if (wr->num_sge > qp->attrs.rq_max_sges) { in siw_post_receive()
1035 siw_dbg_qp(qp, "too many sge's: %d\n", wr->num_sge); in siw_post_receive()
1039 rqe->id = wr->wr_id; in siw_post_receive()
1040 rqe->num_sge = wr->num_sge; in siw_post_receive()
1041 siw_copy_sgl(wr->sg_list, rqe->sge, wr->num_sge); in siw_post_receive()
1049 wr = wr->next; in siw_post_receive()
1057 *bad_wr = wr; in siw_post_receive()
1731 int siw_post_srq_recv(struct ib_srq *base_srq, const struct ib_recv_wr *wr, in siw_post_srq_recv() argument
1751 while (wr) { in siw_post_srq_recv()
1760 if (unlikely(wr->num_sge > srq->max_sge)) { in siw_post_srq_recv()
1762 "[SRQ]: too many sge's: %d\n", wr->num_sge); in siw_post_srq_recv()
1766 rqe->id = wr->wr_id; in siw_post_srq_recv()
1767 rqe->num_sge = wr->num_sge; in siw_post_srq_recv()
1768 siw_copy_sgl(wr->sg_list, rqe->sge, wr->num_sge); in siw_post_srq_recv()
1776 wr = wr->next; in siw_post_srq_recv()
1782 *bad_wr = wr; in siw_post_srq_recv()