Lines Matching refs:wr

336 static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr)  in ipath_post_one_send()  argument
360 if (wr->num_sge > qp->s_max_sge) in ipath_post_one_send()
369 if ((unsigned) wr->opcode >= IB_WR_RDMA_READ) in ipath_post_one_send()
373 if (wr->opcode != IB_WR_SEND && in ipath_post_one_send()
374 wr->opcode != IB_WR_SEND_WITH_IMM) in ipath_post_one_send()
377 if (qp->ibqp.pd != wr->wr.ud.ah->pd) in ipath_post_one_send()
379 } else if ((unsigned) wr->opcode > IB_WR_ATOMIC_FETCH_AND_ADD) in ipath_post_one_send()
381 else if (wr->opcode >= IB_WR_ATOMIC_CMP_AND_SWP && in ipath_post_one_send()
382 (wr->num_sge == 0 || in ipath_post_one_send()
383 wr->sg_list[0].length < sizeof(u64) || in ipath_post_one_send()
384 wr->sg_list[0].addr & (sizeof(u64) - 1))) in ipath_post_one_send()
386 else if (wr->opcode >= IB_WR_RDMA_READ && !qp->s_max_rd_atomic) in ipath_post_one_send()
398 wqe->wr = *wr; in ipath_post_one_send()
400 if (wr->num_sge) { in ipath_post_one_send()
401 acc = wr->opcode >= IB_WR_RDMA_READ ? in ipath_post_one_send()
403 for (i = 0, j = 0; i < wr->num_sge; i++) { in ipath_post_one_send()
404 u32 length = wr->sg_list[i].length; in ipath_post_one_send()
410 &wr->sg_list[i], acc); in ipath_post_one_send()
416 wqe->wr.num_sge = j; in ipath_post_one_send()
445 static int ipath_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, in ipath_post_send() argument
451 for (; wr; wr = wr->next) { in ipath_post_send()
452 err = ipath_post_one_send(qp, wr); in ipath_post_send()
454 *bad_wr = wr; in ipath_post_send()
474 static int ipath_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, in ipath_post_receive() argument
484 *bad_wr = wr; in ipath_post_receive()
489 for (; wr; wr = wr->next) { in ipath_post_receive()
494 if ((unsigned) wr->num_sge > qp->r_rq.max_sge) { in ipath_post_receive()
495 *bad_wr = wr; in ipath_post_receive()
506 *bad_wr = wr; in ipath_post_receive()
512 wqe->wr_id = wr->wr_id; in ipath_post_receive()
513 wqe->num_sge = wr->num_sge; in ipath_post_receive()
514 for (i = 0; i < wr->num_sge; i++) in ipath_post_receive()
515 wqe->sg_list[i] = wr->sg_list[i]; in ipath_post_receive()