Lines Matching refs:wqe
81 static int qib_init_sge(struct qib_qp *qp, struct qib_rwqe *wqe)
94 for (i = j = 0; i < wqe->num_sge; i++) {
95 if (wqe->sg_list[i].length == 0)
99 &wqe->sg_list[i], IB_ACCESS_LOCAL_WRITE))
101 qp->r_len += wqe->sg_list[i].length;
117 wc.wr_id = wqe->wr_id;
144 struct qib_rwqe *wqe;
176 wqe = get_rwqe_ptr(rq, tail);
185 if (!wr_id_only && !qib_init_sge(qp, wqe)) {
189 qp->r_wr_id = wqe->wr_id;
359 struct qib_swqe *wqe;
387 wqe = get_swqe_ptr(sqp, sqp->s_last);
427 sqp->s_sge.sge = wqe->sg_list[0];
428 sqp->s_sge.sg_list = wqe->sg_list + 1;
429 sqp->s_sge.num_sge = wqe->wr.num_sge;
430 sqp->s_len = wqe->length;
431 switch (wqe->wr.opcode) {
434 wc.ex.imm_data = wqe->wr.ex.imm_data;
448 wc.ex.imm_data = wqe->wr.ex.imm_data;
458 if (wqe->length == 0)
460 if (unlikely(!qib_rkey_ok(qp, &qp->r_sge.sge, wqe->length,
461 wqe->wr.wr.rdma.remote_addr,
462 wqe->wr.wr.rdma.rkey,
467 qp->r_sge.total_len = wqe->length;
473 if (unlikely(!qib_rkey_ok(qp, &sqp->s_sge.sge, wqe->length,
474 wqe->wr.wr.rdma.remote_addr,
475 wqe->wr.wr.rdma.rkey,
481 qp->r_sge.sge = wqe->sg_list[0];
482 qp->r_sge.sg_list = wqe->sg_list + 1;
483 qp->r_sge.num_sge = wqe->wr.num_sge;
484 qp->r_sge.total_len = wqe->length;
492 wqe->wr.wr.atomic.remote_addr,
493 wqe->wr.wr.atomic.rkey,
498 sdata = wqe->wr.wr.atomic.compare_add;
500 (wqe->wr.opcode == IB_WR_ATOMIC_FETCH_AND_ADD) ?
503 sdata, wqe->wr.wr.atomic.swap);
550 if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM)
556 wc.byte_len = wqe->length;
564 wqe->wr.send_flags & IB_SEND_SOLICITED);
571 qib_send_complete(sqp, wqe, send_status);
618 qib_send_complete(sqp, wqe, send_status);
770 void qib_send_complete(struct qib_qp *qp, struct qib_swqe *wqe,
779 for (i = 0; i < wqe->wr.num_sge; i++) {
780 struct qib_sge *sge = &wqe->sg_list[i];
787 atomic_dec(&to_iah(wqe->wr.wr.ud.ah)->refcount);
791 (wqe->wr.send_flags & IB_SEND_SIGNALED) ||
796 wc.wr_id = wqe->wr.wr_id;
798 wc.opcode = ib_qib_wc_opcode[wqe->wr.opcode];
801 wc.byte_len = wqe->length;