Lines Matching refs:sqp
299 static void store_attrs(struct mthca_sqp *sqp, const struct ib_qp_attr *attr, in store_attrs() argument
303 sqp->pkey_index = attr->pkey_index; in store_attrs()
305 sqp->qkey = attr->qkey; in store_attrs()
307 sqp->send_psn = attr->sq_psn; in store_attrs()
812 store_attrs(qp->sqp, attr, attr_mask); in __mthca_modify_qp()
1382 qp->sqp->header_buf_size = qp->sq.max * MTHCA_UD_HEADER_SIZE; in mthca_alloc_sqp()
1383 qp->sqp->header_buf = in mthca_alloc_sqp()
1384 dma_alloc_coherent(&dev->pdev->dev, qp->sqp->header_buf_size, in mthca_alloc_sqp()
1385 &qp->sqp->header_dma, GFP_KERNEL); in mthca_alloc_sqp()
1386 if (!qp->sqp->header_buf) in mthca_alloc_sqp()
1393 mthca_array_set(&dev->qp_table.qp, mqpn, qp->sqp); in mthca_alloc_sqp()
1426 dma_free_coherent(&dev->pdev->dev, qp->sqp->header_buf_size, in mthca_alloc_sqp()
1427 qp->sqp->header_buf, qp->sqp->header_dma); in mthca_alloc_sqp()
1490 dma_free_coherent(&dev->pdev->dev, qp->sqp->header_buf_size, in mthca_free_qp()
1491 qp->sqp->header_buf, qp->sqp->header_dma); in mthca_free_qp()
1502 struct mthca_sqp *sqp = qp->sqp; in build_mlx_header() local
1509 &sqp->ud_header); in build_mlx_header()
1511 err = mthca_read_ah(dev, to_mah(wr->ah), &sqp->ud_header); in build_mlx_header()
1516 (sqp->ud_header.lrh.destination_lid == in build_mlx_header()
1518 (sqp->ud_header.lrh.service_level << 8)); in build_mlx_header()
1519 mlx->rlid = sqp->ud_header.lrh.destination_lid; in build_mlx_header()
1524 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY; in build_mlx_header()
1525 sqp->ud_header.immediate_present = 0; in build_mlx_header()
1528 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE; in build_mlx_header()
1529 sqp->ud_header.immediate_present = 1; in build_mlx_header()
1530 sqp->ud_header.immediate_data = wr->wr.ex.imm_data; in build_mlx_header()
1536 sqp->ud_header.lrh.virtual_lane = !qp->ibqp.qp_num ? 15 : 0; in build_mlx_header()
1537 if (sqp->ud_header.lrh.destination_lid == IB_LID_PERMISSIVE) in build_mlx_header()
1538 sqp->ud_header.lrh.source_lid = IB_LID_PERMISSIVE; in build_mlx_header()
1539 sqp->ud_header.bth.solicited_event = !!(wr->wr.send_flags & IB_SEND_SOLICITED); in build_mlx_header()
1541 ib_get_cached_pkey(&dev->ib_dev, qp->port, sqp->pkey_index, in build_mlx_header()
1546 sqp->ud_header.bth.pkey = cpu_to_be16(pkey); in build_mlx_header()
1547 sqp->ud_header.bth.destination_qpn = cpu_to_be32(wr->remote_qpn); in build_mlx_header()
1548 sqp->ud_header.bth.psn = cpu_to_be32((sqp->send_psn++) & ((1 << 24) - 1)); in build_mlx_header()
1549 sqp->ud_header.deth.qkey = cpu_to_be32(wr->remote_qkey & 0x80000000 ? in build_mlx_header()
1550 sqp->qkey : wr->remote_qkey); in build_mlx_header()
1551 sqp->ud_header.deth.source_qpn = cpu_to_be32(qp->ibqp.qp_num); in build_mlx_header()
1553 header_size = ib_ud_header_pack(&sqp->ud_header, in build_mlx_header()
1554 sqp->header_buf + in build_mlx_header()
1559 data->addr = cpu_to_be64(sqp->header_dma + in build_mlx_header()