[go: nahoru, domu]

Lines Matching refs:wqe

42 static u32 restart_sge(struct ipath_sge_state *ss, struct ipath_swqe *wqe,
47 len = ((psn - wqe->psn) & IPATH_PSN_MASK) * pmtu;
48 ss->sge = wqe->sg_list[0];
49 ss->sg_list = wqe->sg_list + 1;
50 ss->num_sge = wqe->wr.num_sge;
52 return wqe->length - len;
58 * @wqe: the work queue to initialize the QP's SGE from
62 static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe)
66 qp->s_len = restart_sge(&qp->s_sge, wqe, qp->s_psn,
218 struct ipath_swqe *wqe;
256 wqe = get_swqe_ptr(qp, qp->s_last);
257 ipath_send_complete(qp, wqe, IB_WC_WR_FLUSH_ERR);
272 wqe = get_swqe_ptr(qp, qp->s_cur);
294 if ((wqe->wr.send_flags & IB_SEND_FENCE) &&
299 wqe->psn = qp->s_next_psn;
307 len = wqe->length;
310 switch (wqe->wr.opcode) {
315 ipath_cmp24(wqe->ssn, qp->s_lsn + 1) > 0) {
319 wqe->lpsn = wqe->psn;
321 wqe->lpsn += (len - 1) / pmtu;
326 if (wqe->wr.opcode == IB_WR_SEND)
331 ohdr->u.imm_data = wqe->wr.ex.imm_data;
334 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
348 ipath_cmp24(wqe->ssn, qp->s_lsn + 1) > 0) {
353 cpu_to_be64(wqe->wr.wr.rdma.remote_addr);
355 cpu_to_be32(wqe->wr.wr.rdma.rkey);
358 wqe->lpsn = wqe->psn;
360 wqe->lpsn += (len - 1) / pmtu;
365 if (wqe->wr.opcode == IB_WR_RDMA_WRITE)
371 ohdr->u.rc.imm_data = wqe->wr.ex.imm_data;
373 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
401 wqe->lpsn = qp->s_next_psn++;
404 cpu_to_be64(wqe->wr.wr.rdma.remote_addr);
406 cpu_to_be32(wqe->wr.wr.rdma.rkey);
431 wqe->lpsn = wqe->psn;
433 if (wqe->wr.opcode == IB_WR_ATOMIC_CMP_AND_SWP) {
436 wqe->wr.wr.atomic.swap);
438 wqe->wr.wr.atomic.compare_add);
442 wqe->wr.wr.atomic.compare_add);
446 wqe->wr.wr.atomic.remote_addr >> 32);
448 wqe->wr.wr.atomic.remote_addr);
450 wqe->wr.wr.atomic.rkey);
461 qp->s_sge.sge = wqe->sg_list[0];
462 qp->s_sge.sg_list = wqe->sg_list + 1;
463 qp->s_sge.num_sge = wqe->wr.num_sge;
464 qp->s_len = wqe->length;
471 if (wqe->wr.opcode == IB_WR_RDMA_READ)
472 qp->s_psn = wqe->lpsn + 1;
495 ipath_init_restart(qp, wqe);
510 if (wqe->wr.opcode == IB_WR_SEND)
515 ohdr->u.imm_data = wqe->wr.ex.imm_data;
518 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
531 ipath_init_restart(qp, wqe);
546 if (wqe->wr.opcode == IB_WR_RDMA_WRITE)
551 ohdr->u.imm_data = wqe->wr.ex.imm_data;
553 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
567 ipath_init_restart(qp, wqe);
568 len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * pmtu;
570 cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len);
572 cpu_to_be32(wqe->wr.wr.rdma.rkey);
577 qp->s_psn = wqe->lpsn + 1;
727 struct ipath_swqe *wqe = get_swqe_ptr(qp, n);
736 if (ipath_cmp24(psn, wqe->psn) <= 0) {
742 opcode = wqe->wr.opcode;
750 wqe = get_swqe_ptr(qp, n);
751 diff = ipath_cmp24(psn, wqe->psn);
763 opcode = wqe->wr.opcode;
807 struct ipath_swqe *wqe = get_swqe_ptr(qp, qp->s_last);
811 ipath_send_complete(qp, wqe, IB_WC_RETRY_EXC_ERR);
829 if (wqe->wr.opcode == IB_WR_RDMA_READ)
863 struct ipath_swqe *wqe;
888 wqe = get_swqe_ptr(qp, qp->s_last);
894 while ((diff = ipath_cmp24(ack_psn, wqe->lpsn)) >= 0) {
901 if (wqe->wr.opcode == IB_WR_RDMA_READ &&
916 if ((wqe->wr.opcode == IB_WR_RDMA_READ &&
918 ((wqe->wr.opcode == IB_WR_ATOMIC_CMP_AND_SWP ||
919 wqe->wr.opcode == IB_WR_ATOMIC_FETCH_AND_ADD) &&
925 update_last_psn(qp, wqe->psn - 1);
927 ipath_restart_rc(qp, wqe->psn);
934 if (wqe->wr.opcode == IB_WR_ATOMIC_CMP_AND_SWP ||
935 wqe->wr.opcode == IB_WR_ATOMIC_FETCH_AND_ADD)
936 *(u64 *) wqe->sg_list[0].vaddr = val;
938 (wqe->wr.opcode == IB_WR_RDMA_READ ||
939 wqe->wr.opcode == IB_WR_ATOMIC_CMP_AND_SWP ||
940 wqe->wr.opcode == IB_WR_ATOMIC_FETCH_AND_ADD)) {
950 (wqe->wr.send_flags & IB_SEND_SIGNALED)) {
952 wc.wr_id = wqe->wr.wr_id;
954 wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode];
955 wc.byte_len = wqe->length;
974 wqe = get_swqe_ptr(qp, qp->s_cur);
976 qp->s_psn = wqe->psn;
984 wqe = get_swqe_ptr(qp, qp->s_last);
1032 if (wqe->wr.opcode == IB_WR_RDMA_READ)
1079 ipath_send_complete(qp, wqe, status);
1125 struct ipath_swqe *wqe;
1162 wqe = get_swqe_ptr(qp, qp->s_last);
1189 wqe = get_swqe_ptr(qp, qp->s_last);
1190 if (unlikely(wqe->wr.opcode != IB_WR_RDMA_READ))
1199 wqe, psn, pmtu);
1212 if (unlikely(wqe->wr.opcode != IB_WR_RDMA_READ))
1261 wqe = get_swqe_ptr(qp, qp->s_last);
1263 wqe, psn, pmtu);
1276 if (unlikely(wqe->wr.opcode != IB_WR_RDMA_READ))
1310 ipath_send_complete(qp, wqe, status);