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()
1385 qp->sqp->header_buf_size = qp->sq.max * MTHCA_UD_HEADER_SIZE; in mthca_alloc_sqp()
1386 qp->sqp->header_buf = in mthca_alloc_sqp()
1387 dma_alloc_coherent(&dev->pdev->dev, qp->sqp->header_buf_size, in mthca_alloc_sqp()
1388 &qp->sqp->header_dma, GFP_KERNEL); in mthca_alloc_sqp()
1389 if (!qp->sqp->header_buf) in mthca_alloc_sqp()
1396 mthca_array_set(&dev->qp_table.qp, mqpn, qp->sqp); in mthca_alloc_sqp()
1429 dma_free_coherent(&dev->pdev->dev, qp->sqp->header_buf_size, in mthca_alloc_sqp()
1430 qp->sqp->header_buf, qp->sqp->header_dma); in mthca_alloc_sqp()
1493 dma_free_coherent(&dev->pdev->dev, qp->sqp->header_buf_size, in mthca_free_qp()
1494 qp->sqp->header_buf, qp->sqp->header_dma); in mthca_free_qp()
1505 struct mthca_sqp *sqp = qp->sqp; in build_mlx_header() local
1512 &sqp->ud_header); in build_mlx_header()
1514 err = mthca_read_ah(dev, to_mah(wr->ah), &sqp->ud_header); in build_mlx_header()
1519 (sqp->ud_header.lrh.destination_lid == in build_mlx_header()
1521 (sqp->ud_header.lrh.service_level << 8)); in build_mlx_header()
1522 mlx->rlid = sqp->ud_header.lrh.destination_lid; in build_mlx_header()
1527 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY; in build_mlx_header()
1528 sqp->ud_header.immediate_present = 0; in build_mlx_header()
1531 sqp->ud_header.bth.opcode = IB_OPCODE_UD_SEND_ONLY_WITH_IMMEDIATE; in build_mlx_header()
1532 sqp->ud_header.immediate_present = 1; in build_mlx_header()
1533 sqp->ud_header.immediate_data = wr->wr.ex.imm_data; in build_mlx_header()
1539 sqp->ud_header.lrh.virtual_lane = !qp->ibqp.qp_num ? 15 : 0; in build_mlx_header()
1540 if (sqp->ud_header.lrh.destination_lid == IB_LID_PERMISSIVE) in build_mlx_header()
1541 sqp->ud_header.lrh.source_lid = IB_LID_PERMISSIVE; in build_mlx_header()
1542 sqp->ud_header.bth.solicited_event = !!(wr->wr.send_flags & IB_SEND_SOLICITED); in build_mlx_header()
1544 ib_get_cached_pkey(&dev->ib_dev, qp->port, sqp->pkey_index, in build_mlx_header()
1549 sqp->ud_header.bth.pkey = cpu_to_be16(pkey); in build_mlx_header()
1550 sqp->ud_header.bth.destination_qpn = cpu_to_be32(wr->remote_qpn); in build_mlx_header()
1551 sqp->ud_header.bth.psn = cpu_to_be32((sqp->send_psn++) & ((1 << 24) - 1)); in build_mlx_header()
1552 sqp->ud_header.deth.qkey = cpu_to_be32(wr->remote_qkey & 0x80000000 ? in build_mlx_header()
1553 sqp->qkey : wr->remote_qkey); in build_mlx_header()
1554 sqp->ud_header.deth.source_qpn = cpu_to_be32(qp->ibqp.qp_num); in build_mlx_header()
1556 header_size = ib_ud_header_pack(&sqp->ud_header, in build_mlx_header()
1557 sqp->header_buf + in build_mlx_header()
1562 data->addr = cpu_to_be64(sqp->header_dma + in build_mlx_header()