• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/dev/cxgbe/iw_cxgbe/

Lines Matching refs:wqe

407 static int build_rdma_send(struct t4_sq *sq, union t4_wr *wqe,
419 wqe->send.sendop_pkd = cpu_to_be32(
422 wqe->send.sendop_pkd = cpu_to_be32(
424 wqe->send.stag_inv = 0;
428 wqe->send.sendop_pkd = cpu_to_be32(
431 wqe->send.sendop_pkd = cpu_to_be32(
433 wqe->send.stag_inv = cpu_to_be32(wr->ex.invalidate_rkey);
439 wqe->send.r3 = 0;
440 wqe->send.r4 = 0;
445 ret = build_immd(sq, wqe->send.u.immd_src, wr,
449 size = sizeof wqe->send + sizeof(struct fw_ri_immd) +
454 wqe->send.u.isgl_src,
458 size = sizeof wqe->send + sizeof(struct fw_ri_isgl) +
462 wqe->send.u.immd_src[0].op = FW_RI_DATA_IMMD;
463 wqe->send.u.immd_src[0].r1 = 0;
464 wqe->send.u.immd_src[0].r2 = 0;
465 wqe->send.u.immd_src[0].immdlen = 0;
466 size = sizeof wqe->send + sizeof(struct fw_ri_immd);
470 wqe->send.plen = cpu_to_be32(plen);
474 static int build_rdma_write(struct t4_sq *sq, union t4_wr *wqe,
483 wqe->write.immd_data = 0;
484 wqe->write.stag_sink = cpu_to_be32(rdma_wr(wr)->rkey);
485 wqe->write.to_sink = cpu_to_be64(rdma_wr(wr)->remote_addr);
488 ret = build_immd(sq, wqe->write.u.immd_src, wr,
492 size = sizeof wqe->write + sizeof(struct fw_ri_immd) +
497 wqe->write.u.isgl_src,
501 size = sizeof wqe->write + sizeof(struct fw_ri_isgl) +
505 wqe->write.u.immd_src[0].op = FW_RI_DATA_IMMD;
506 wqe->write.u.immd_src[0].r1 = 0;
507 wqe->write.u.immd_src[0].r2 = 0;
508 wqe->write.u.immd_src[0].immdlen = 0;
509 size = sizeof wqe->write + sizeof(struct fw_ri_immd);
513 wqe->write.plen = cpu_to_be32(plen);
517 static int build_rdma_read(union t4_wr *wqe, struct ib_send_wr *wr, u8 *len16)
522 wqe->read.stag_src = cpu_to_be32(rdma_wr(wr)->rkey);
523 wqe->read.to_src_hi = cpu_to_be32((u32)(rdma_wr(wr)->remote_addr
525 wqe->read.to_src_lo =
527 wqe->read.stag_sink = cpu_to_be32(wr->sg_list[0].lkey);
528 wqe->read.plen = cpu_to_be32(wr->sg_list[0].length);
529 wqe->read.to_sink_hi = cpu_to_be32((u32)(wr->sg_list[0].addr
531 wqe->read.to_sink_lo = cpu_to_be32((u32)(wr->sg_list[0].addr));
533 wqe->read.stag_src = cpu_to_be32(2);
534 wqe->read.to_src_hi = 0;
535 wqe->read.to_src_lo = 0;
536 wqe->read.stag_sink = cpu_to_be32(2);
537 wqe->read.plen = 0;
538 wqe->read.to_sink_hi = 0;
539 wqe->read.to_sink_lo = 0;
541 wqe->read.r2 = 0;
542 wqe->read.r5 = 0;
543 *len16 = DIV_ROUND_UP(sizeof wqe->read, 16);
547 static int build_rdma_recv(struct c4iw_qp *qhp, union t4_recv_wr *wqe,
554 &wqe->recv.isgl, wr->sg_list, wr->num_sge, NULL);
557 *len16 = DIV_ROUND_UP(sizeof wqe->recv +
562 static int build_inv_stag(union t4_wr *wqe, struct ib_send_wr *wr,
565 wqe->inv.stag_inv = cpu_to_be32(wr->ex.invalidate_rkey);
566 wqe->inv.r2 = 0;
567 *len16 = DIV_ROUND_UP(sizeof wqe->inv, 16);
707 static int build_memreg(struct t4_sq *sq, union t4_wr *wqe,
722 wqe->fr.qpbinde_to_dcacpu = 0;
723 wqe->fr.pgsz_shift = ilog2(wr->mr->page_size) - 12;
724 wqe->fr.addr_type = FW_RI_VA_BASED_TO;
725 wqe->fr.mem_perms = c4iw_ib_to_tpt_access(wr->access);
726 wqe->fr.len_hi = cpu_to_be32(mhp->ibmr.length >> 32);
727 wqe->fr.len_lo = cpu_to_be32(mhp->ibmr.length & 0xffffffff);
728 wqe->fr.stag = cpu_to_be32(wr->key);
729 wqe->fr.va_hi = cpu_to_be32(mhp->ibmr.iova >> 32);
730 wqe->fr.va_lo_fbo = cpu_to_be32(mhp->ibmr.iova & 0xffffffff);
739 sglp = (struct fw_ri_dsgl *)(&wqe->fr + 1);
746 *len16 = DIV_ROUND_UP(sizeof(wqe->fr) + sizeof(*sglp), 16);
748 imdp = (struct fw_ri_immd *)(&wqe->fr + 1);
768 *len16 = DIV_ROUND_UP(sizeof(wqe->fr) + sizeof(*imdp)
783 union t4_wr *wqe = NULL;
810 wqe = (union t4_wr *)((u8 *)qhp->wq.sq.queue +
829 err = build_rdma_send(&qhp->wq.sq, wqe, wr, &len16);
834 err = build_rdma_write(&qhp->wq.sq, wqe, wr, &len16);
847 err = build_rdma_read(wqe, wr, &len16);
861 err = build_tpte_memreg(&wqe->fr_tpte, reg_wr(wr),
865 err = build_memreg(&qhp->wq.sq, wqe, reg_wr(wr),
879 err = build_inv_stag(wqe, wr, &len16);
898 init_wr_hdr(wqe, qhp->wq.sq.pidx, fw_opcode, fw_flags, len16);
910 t4_ring_sq_db(&qhp->wq, idx, wqe, rdev->adap->iwt.wc_en);
920 union t4_recv_wr *wqe = NULL;
945 wqe = (union t4_recv_wr *)((u8 *)qhp->wq.rq.queue +
949 err = build_rdma_recv(qhp, wqe, wr, &len16);
959 wqe->recv.opcode = FW_RI_RECV_WR;
960 wqe->recv.r1 = 0;
961 wqe->recv.wrid = qhp->wq.rq.pidx;
962 wqe->recv.r2[0] = 0;
963 wqe->recv.r2[1] = 0;
964 wqe->recv.r2[2] = 0;
965 wqe->recv.len16 = len16;
974 t4_ring_rq_db(&qhp->wq, idx, wqe, qhp->rhp->rdev.adap->iwt.wc_en);
1119 struct fw_ri_wr *wqe;
1130 wr = alloc_wrqe(sizeof(*wqe), toep->ofld_txq);
1133 wqe = wrtod(wr);
1135 memset(wqe, 0, sizeof *wqe);
1136 wqe->op_compl = cpu_to_be32(V_FW_WR_OP(FW_RI_WR));
1137 wqe->flowid_len16 = cpu_to_be32(
1139 V_FW_WR_LEN16(DIV_ROUND_UP(sizeof *wqe, 16)));
1141 wqe->u.terminate.type = FW_RI_TYPE_TERMINATE;
1142 wqe->u.terminate.immdlen = cpu_to_be32(sizeof *term);
1143 term = (struct terminate_message *)wqe->u.terminate.termmsg;
1149 ret = creds(toep, inp, sizeof(*wqe));
1249 struct fw_ri_wr *wqe;
1262 wr = alloc_wrqe(sizeof(*wqe), toep->ofld_txq);
1265 wqe = wrtod(wr);
1267 memset(wqe, 0, sizeof *wqe);
1269 wqe->op_compl = cpu_to_be32(V_FW_WR_OP(FW_RI_WR) | F_FW_WR_COMPL);
1270 wqe->flowid_len16 = cpu_to_be32(V_FW_WR_FLOWID(ep->hwtid) |
1271 V_FW_WR_LEN16(DIV_ROUND_UP(sizeof *wqe, 16)));
1272 wqe->cookie = (unsigned long) &ep->com.wr_wait;
1273 wqe->u.fini.type = FW_RI_TYPE_FINI;
1277 ret = creds(toep, inp, sizeof(*wqe));
1342 struct fw_ri_wr *wqe;
1356 wr = alloc_wrqe(sizeof(*wqe), toep->ofld_txq);
1359 wqe = wrtod(wr);
1367 memset(wqe, 0, sizeof *wqe);
1369 wqe->op_compl = cpu_to_be32(
1372 wqe->flowid_len16 = cpu_to_be32(V_FW_WR_FLOWID(ep->hwtid) |
1373 V_FW_WR_LEN16(DIV_ROUND_UP(sizeof *wqe, 16)));
1375 wqe->cookie = (unsigned long) &ep->com.wr_wait;
1377 wqe->u.init.type = FW_RI_TYPE_INIT;
1378 wqe->u.init.mpareqbit_p2ptype =
1381 wqe->u.init.mpa_attrs = FW_RI_MPA_IETF_ENABLE;
1383 wqe->u.init.mpa_attrs |= FW_RI_MPA_RX_MARKER_ENABLE;
1385 wqe->u.init.mpa_attrs |= FW_RI_MPA_TX_MARKER_ENABLE;
1387 wqe->u.init.mpa_attrs |= FW_RI_MPA_CRC_ENABLE;
1389 wqe->u.init.qp_caps = FW_RI_QP_RDMA_READ_ENABLE |
1393 wqe->u.init.qp_caps |= FW_RI_QP_FAST_REGISTER_ENABLE |
1395 wqe->u.init.nrqe = cpu_to_be16(t4_rqes_posted(&qhp->wq));
1396 wqe->u.init.pdid = cpu_to_be32(qhp->attr.pd);
1397 wqe->u.init.qpid = cpu_to_be32(qhp->wq.sq.qid);
1398 wqe->u.init.sq_eqid = cpu_to_be32(qhp->wq.sq.qid);
1399 wqe->u.init.rq_eqid = cpu_to_be32(qhp->wq.rq.qid);
1400 wqe->u.init.scqid = cpu_to_be32(qhp->attr.scq);
1401 wqe->u.init.rcqid = cpu_to_be32(qhp->attr.rcq);
1402 wqe->u.init.ord_max = cpu_to_be32(qhp->attr.max_ord);
1403 wqe->u.init.ird_max = cpu_to_be32(qhp->attr.max_ird);
1404 wqe->u.init.iss = cpu_to_be32(ep->snd_seq);
1405 wqe->u.init.irs = cpu_to_be32(ep->rcv_seq);
1406 wqe->u.init.hwrqsize = cpu_to_be32(qhp->wq.rq.rqt_size);
1407 wqe->u.init.hwrqaddr = cpu_to_be32(qhp->wq.rq.rqt_hwaddr -
1410 build_rtr_msg(qhp->attr.mpa_attr.p2p_type, &wqe->u.init);
1414 ret = creds(toep, inp, sizeof(*wqe));