[go: nahoru, domu]

Lines Matching refs:wqe

42 static int build_rdma_send(union t3_wr *wqe, struct ib_send_wr *wr,
51 wqe->send.rdmaop = T3_SEND_WITH_SE;
53 wqe->send.rdmaop = T3_SEND;
54 wqe->send.rem_stag = 0;
58 wqe->send.rdmaop = T3_SEND_WITH_SE_INV;
60 wqe->send.rdmaop = T3_SEND_WITH_INV;
61 wqe->send.rem_stag = cpu_to_be32(wr->ex.invalidate_rkey);
68 wqe->send.reserved[0] = 0;
69 wqe->send.reserved[1] = 0;
70 wqe->send.reserved[2] = 0;
77 wqe->send.sgl[i].stag = cpu_to_be32(wr->sg_list[i].lkey);
78 wqe->send.sgl[i].len = cpu_to_be32(wr->sg_list[i].length);
79 wqe->send.sgl[i].to = cpu_to_be64(wr->sg_list[i].addr);
81 wqe->send.num_sgle = cpu_to_be32(wr->num_sge);
83 wqe->send.plen = cpu_to_be32(plen);
87 static int build_rdma_write(union t3_wr *wqe, struct ib_send_wr *wr,
94 wqe->write.rdmaop = T3_RDMA_WRITE;
95 wqe->write.reserved[0] = 0;
96 wqe->write.reserved[1] = 0;
97 wqe->write.reserved[2] = 0;
98 wqe->write.stag_sink = cpu_to_be32(wr->wr.rdma.rkey);
99 wqe->write.to_sink = cpu_to_be64(wr->wr.rdma.remote_addr);
103 wqe->write.sgl[0].stag = wr->ex.imm_data;
104 wqe->write.sgl[0].len = cpu_to_be32(0);
105 wqe->write.num_sgle = cpu_to_be32(0);
114 wqe->write.sgl[i].stag =
116 wqe->write.sgl[i].len =
118 wqe->write.sgl[i].to =
121 wqe->write.num_sgle = cpu_to_be32(wr->num_sge);
124 wqe->write.plen = cpu_to_be32(plen);
128 static int build_rdma_read(union t3_wr *wqe, struct ib_send_wr *wr,
133 wqe->read.rdmaop = T3_READ_REQ;
135 wqe->read.local_inv = 1;
137 wqe->read.local_inv = 0;
138 wqe->read.reserved[0] = 0;
139 wqe->read.reserved[1] = 0;
140 wqe->read.rem_stag = cpu_to_be32(wr->wr.rdma.rkey);
141 wqe->read.rem_to = cpu_to_be64(wr->wr.rdma.remote_addr);
142 wqe->read.local_stag = cpu_to_be32(wr->sg_list[0].lkey);
143 wqe->read.local_len = cpu_to_be32(wr->sg_list[0].length);
144 wqe->read.local_to = cpu_to_be64(wr->sg_list[0].addr);
149 static int build_fastreg(union t3_wr *wqe, struct ib_send_wr *wr,
158 wqe->fastreg.stag = cpu_to_be32(wr->wr.fast_reg.rkey);
159 wqe->fastreg.len = cpu_to_be32(wr->wr.fast_reg.length);
160 wqe->fastreg.va_base_hi = cpu_to_be32(wr->wr.fast_reg.iova_start >> 32);
161 wqe->fastreg.va_base_lo_fbo =
163 wqe->fastreg.page_type_perms = cpu_to_be32(
168 p = &wqe->fastreg.pbl_addrs[0];
174 wqe = (union t3_wr *)(wq->queue +
176 build_fw_riwrh((void *)wqe, T3_WR_FASTREG, 0,
181 p = &wqe->pbl_frag.pbl_addrs[0];
191 static int build_inv_stag(union t3_wr *wqe, struct ib_send_wr *wr,
194 wqe->local_inv.stag = cpu_to_be32(wr->ex.invalidate_rkey);
195 wqe->local_inv.reserved = 0;
247 static int build_rdma_recv(struct iwch_qp *qhp, union t3_wr *wqe,
258 wqe->recv.pagesz[0] = page_size[0];
259 wqe->recv.pagesz[1] = page_size[1];
260 wqe->recv.pagesz[2] = page_size[2];
261 wqe->recv.pagesz[3] = page_size[3];
262 wqe->recv.num_sgle = cpu_to_be32(wr->num_sge);
264 wqe->recv.sgl[i].stag = cpu_to_be32(wr->sg_list[i].lkey);
265 wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length);
268 wqe->recv.sgl[i].to = cpu_to_be64(((u32)wr->sg_list[i].addr) &
272 wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_addr[i]);
275 wqe->recv.sgl[i].stag = 0;
276 wqe->recv.sgl[i].len = 0;
277 wqe->recv.sgl[i].to = 0;
278 wqe->recv.pbl_addr[i] = 0;
287 static int build_zero_stag_recv(struct iwch_qp *qhp, union t3_wr *wqe,
310 wqe->recv.num_sgle = cpu_to_be32(wr->num_sge);
323 wqe->recv.pagesz[i] = T3_STAG0_PAGE_SHIFT;
330 wqe->recv.sgl[i].stag = 0;
331 wqe->recv.sgl[i].len = cpu_to_be32(wr->sg_list[i].length);
332 wqe->recv.sgl[i].to = cpu_to_be64(wr->sg_list[i].addr);
333 wqe->recv.pbl_addr[i] = cpu_to_be32(pbl_offset);
337 wqe->recv.pagesz[i] = 0;
338 wqe->recv.sgl[i].stag = 0;
339 wqe->recv.sgl[i].len = 0;
340 wqe->recv.sgl[i].to = 0;
341 wqe->recv.pbl_addr[i] = 0;
359 union t3_wr *wqe;
385 wqe = (union t3_wr *) (qhp->wq.queue + idx);
399 err = build_rdma_send(wqe, wr, &t3_wr_flit_cnt);
404 err = build_rdma_write(wqe, wr, &t3_wr_flit_cnt);
410 err = build_rdma_read(wqe, wr, &t3_wr_flit_cnt);
413 sqp->read_len = wqe->read.local_len;
419 err = build_fastreg(wqe, wr, &t3_wr_flit_cnt,
426 err = build_inv_stag(wqe, wr, &t3_wr_flit_cnt);
435 wqe->send.wrid.id0.hi = qhp->wq.sq_wptr;
442 build_fw_riwrh((void *) wqe, t3_wr_opcode, t3_wr_flags,
471 union t3_wr *wqe;
495 wqe = (union t3_wr *) (qhp->wq.queue + idx);
498 err = build_rdma_recv(qhp, wqe, wr);
500 err = build_zero_stag_recv(qhp, wqe, wr);
507 build_fw_riwrh((void *) wqe, T3_WR_RCV, T3_COMPLETION_FLAG,
511 "wqe %p \n", __func__, (unsigned long long) wr->wr_id,
512 idx, qhp->wq.rq_wptr, qhp->wq.rq_rptr, wqe);
535 union t3_wr *wqe;
564 wqe = (union t3_wr *) (qhp->wq.queue + idx);
573 wqe->bind.reserved = 0;
574 wqe->bind.type = TPT_VATO;
577 wqe->bind.perms = iwch_ib_to_tpt_bind_access(
579 wqe->bind.mr_stag = cpu_to_be32(mw_bind->bind_info.mr->lkey);
580 wqe->bind.mw_stag = cpu_to_be32(mw->rkey);
581 wqe->bind.mw_len = cpu_to_be32(mw_bind->bind_info.length);
582 wqe->bind.mw_va = cpu_to_be64(mw_bind->bind_info.addr);
588 wqe->send.wrid.id0.hi = qhp->wq.sq_wptr;
595 wqe->bind.mr_pbl_addr = cpu_to_be32(pbl_addr);
596 wqe->bind.mr_pagesz = page_size;
597 build_fw_riwrh((void *)wqe, T3_WR_BIND, t3_wr_flags,
744 union t3_wr *wqe;
754 wqe = (union t3_wr *)skb_put(skb, sizeof(struct t3_rdma_read_wr));
755 memset(wqe, 0, sizeof(struct t3_rdma_read_wr));
756 wqe->read.rdmaop = T3_READ_REQ;
757 wqe->read.reserved[0] = 0;
758 wqe->read.reserved[1] = 0;
759 wqe->read.rem_stag = cpu_to_be32(1);
760 wqe->read.rem_to = cpu_to_be64(1);
761 wqe->read.local_stag = cpu_to_be32(1);
762 wqe->read.local_len = cpu_to_be32(0);
763 wqe->read.local_to = cpu_to_be64(1);
764 wqe->send.wrh.op_seop_flags = cpu_to_be32(V_FW_RIWR_OP(T3_WR_READ));
765 wqe->send.wrh.gen_tid_len = cpu_to_be32(V_FW_RIWR_TID(ep->hwtid)|
776 union t3_wr *wqe;
786 wqe = (union t3_wr *)skb_put(skb, 40);
787 memset(wqe, 0, 40);
788 wqe->send.rdmaop = T3_TERMINATE;
791 wqe->send.plen = htonl(4);
794 term = (struct terminate_message *)wqe->send.sgl;
796 wqe->send.wrh.op_seop_flags = cpu_to_be32(V_FW_RIWR_OP(T3_WR_SEND) |
798 wqe->send.wrh.gen_tid_len = cpu_to_be32(V_FW_RIWR_TID(qhp->ep->hwtid));
884 union t3_wr *wqe = qhp->wq.queue;
887 while (count < USHRT_MAX && fw_riwrh_opcode((struct fw_riwrh *)wqe) == T3_WR_RCV) {
889 wqe++;