Lines Matching refs:ibwr

15 static int post_one_recv(struct rxe_rq *rq, const struct ib_recv_wr *ibwr);
665 static int validate_send_wr(struct rxe_qp *qp, const struct ib_send_wr *ibwr, in validate_send_wr() argument
668 int num_sge = ibwr->num_sge; in validate_send_wr()
676 mask = wr_opcode_mask(ibwr->opcode, qp); in validate_send_wr()
688 for (i = 0; i < ibwr->num_sge; i++) in validate_send_wr()
689 length += ibwr->sg_list[i].length; in validate_send_wr()
701 if (atomic_wr(ibwr)->remote_addr & 0x7) { in validate_send_wr()
706 if (ibwr->send_flags & IB_SEND_INLINE) { in validate_send_wr()
727 const struct ib_send_wr *ibwr) in init_send_wr() argument
729 wr->wr_id = ibwr->wr_id; in init_send_wr()
730 wr->opcode = ibwr->opcode; in init_send_wr()
731 wr->send_flags = ibwr->send_flags; in init_send_wr()
735 struct ib_ah *ibah = ud_wr(ibwr)->ah; in init_send_wr()
737 wr->wr.ud.remote_qpn = ud_wr(ibwr)->remote_qpn; in init_send_wr()
738 wr->wr.ud.remote_qkey = ud_wr(ibwr)->remote_qkey; in init_send_wr()
741 wr->wr.ud.pkey_index = ud_wr(ibwr)->pkey_index; in init_send_wr()
745 wr->ex.imm_data = ibwr->ex.imm_data; in init_send_wr()
757 wr->ex.imm_data = ibwr->ex.imm_data; in init_send_wr()
761 wr->wr.rdma.remote_addr = rdma_wr(ibwr)->remote_addr; in init_send_wr()
762 wr->wr.rdma.rkey = rdma_wr(ibwr)->rkey; in init_send_wr()
765 wr->ex.imm_data = ibwr->ex.imm_data; in init_send_wr()
768 wr->ex.invalidate_rkey = ibwr->ex.invalidate_rkey; in init_send_wr()
771 wr->ex.invalidate_rkey = ibwr->ex.invalidate_rkey; in init_send_wr()
772 wr->wr.rdma.remote_addr = rdma_wr(ibwr)->remote_addr; in init_send_wr()
773 wr->wr.rdma.rkey = rdma_wr(ibwr)->rkey; in init_send_wr()
778 atomic_wr(ibwr)->remote_addr; in init_send_wr()
780 atomic_wr(ibwr)->compare_add; in init_send_wr()
781 wr->wr.atomic.swap = atomic_wr(ibwr)->swap; in init_send_wr()
782 wr->wr.atomic.rkey = atomic_wr(ibwr)->rkey; in init_send_wr()
785 wr->ex.invalidate_rkey = ibwr->ex.invalidate_rkey; in init_send_wr()
788 wr->wr.reg.mr = reg_wr(ibwr)->mr; in init_send_wr()
789 wr->wr.reg.key = reg_wr(ibwr)->key; in init_send_wr()
790 wr->wr.reg.access = reg_wr(ibwr)->access; in init_send_wr()
808 const struct ib_send_wr *ibwr) in copy_inline_data_to_wqe() argument
810 struct ib_sge *sge = ibwr->sg_list; in copy_inline_data_to_wqe()
814 for (i = 0; i < ibwr->num_sge; i++, sge++) { in copy_inline_data_to_wqe()
820 static int init_send_wqe(struct rxe_qp *qp, const struct ib_send_wr *ibwr, in init_send_wqe() argument
824 int num_sge = ibwr->num_sge; in init_send_wqe()
827 err = init_send_wr(qp, &wqe->wr, ibwr); in init_send_wqe()
838 if (unlikely(ibwr->send_flags & IB_SEND_INLINE)) in init_send_wqe()
839 copy_inline_data_to_wqe(wqe, ibwr); in init_send_wqe()
841 memcpy(wqe->dma.sge, ibwr->sg_list, in init_send_wqe()
844 wqe->iova = mask & WR_ATOMIC_MASK ? atomic_wr(ibwr)->remote_addr : in init_send_wqe()
845 mask & WR_READ_OR_WRITE_MASK ? rdma_wr(ibwr)->remote_addr : 0; in init_send_wqe()
858 static int post_one_send(struct rxe_qp *qp, const struct ib_send_wr *ibwr) in post_one_send() argument
867 err = validate_send_wr(qp, ibwr, &mask, &length); in post_one_send()
878 err = init_send_wqe(qp, ibwr, mask, length, send_wqe); in post_one_send()
886 const struct ib_send_wr *ibwr, in rxe_post_send_kernel() argument
893 while (ibwr) { in rxe_post_send_kernel()
894 err = post_one_send(qp, ibwr); in rxe_post_send_kernel()
896 *bad_wr = ibwr; in rxe_post_send_kernel()
899 ibwr = ibwr->next; in rxe_post_send_kernel()
950 static int post_one_recv(struct rxe_rq *rq, const struct ib_recv_wr *ibwr) in post_one_recv() argument
955 int num_sge = ibwr->num_sge; in post_one_recv()
974 length += ibwr->sg_list[i].length; in post_one_recv()
985 recv_wqe->wr_id = ibwr->wr_id; in post_one_recv()
991 memcpy(recv_wqe->dma.sge, ibwr->sg_list, in post_one_recv()