Lines Matching refs:mqp

110 	return qp->mqp.qpn >= dev->dev->phys_caps.base_tunnel_sqpn &&  in is_tunnel_qp()
111 qp->mqp.qpn < dev->dev->phys_caps.base_tunnel_sqpn + in is_tunnel_qp()
122 qp->mqp.qpn >= dev->dev->phys_caps.base_sqpn && in is_sqp()
123 qp->mqp.qpn <= dev->dev->phys_caps.base_sqpn + 3); in is_sqp()
129 if (qp->mqp.qpn == dev->dev->caps.spec_qps[i].qp0_proxy || in is_sqp()
130 qp->mqp.qpn == dev->dev->caps.spec_qps[i].qp1_proxy) { in is_sqp()
150 qp->mqp.qpn >= dev->dev->phys_caps.base_sqpn && in is_qp0()
151 qp->mqp.qpn <= dev->dev->phys_caps.base_sqpn + 1); in is_qp0()
157 if (qp->mqp.qpn == dev->dev->caps.spec_qps[i].qp0_proxy) { in is_qp0()
623 qp->mqp.usage = MLX4_RES_USAGE_USER_VERBS; in create_qp_rss()
625 err = mlx4_qp_reserve_range(dev->dev, 1, 1, &qpn, 0, qp->mqp.usage); in create_qp_rss()
629 err = mlx4_qp_alloc(dev->dev, qpn, &qp->mqp); in create_qp_rss()
663 mlx4_qp_remove(dev->dev, &qp->mqp); in create_qp_rss()
664 mlx4_qp_free(dev->dev, &qp->mqp); in create_qp_rss()
735 qp->ibqp.qp_num = qp->mqp.qpn; in _mlx4_ib_create_qp_rss()
765 qp->mqp.usage); in mlx4_ib_alloc_wqn()
901 qp->mqp.usage = MLX4_RES_USAGE_USER_VERBS; in create_rq()
907 err = mlx4_qp_alloc(dev->dev, qpn, &qp->mqp); in create_rq()
916 qp->doorbell_qpn = swab32(qp->mqp.qpn << 8); in create_rq()
918 qp->mqp.event = mlx4_ib_wq_event; in create_rq()
1086 qp->mqp.usage = MLX4_RES_USAGE_USER_VERBS; in create_qp_common()
1143 qp->mqp.usage = MLX4_RES_USAGE_DRIVER; in create_qp_common()
1164 qp->mqp.usage); in create_qp_common()
1170 &qpn, 0, qp->mqp.usage); in create_qp_common()
1178 err = mlx4_qp_alloc(dev->dev, qpn, &qp->mqp); in create_qp_common()
1183 qp->mqp.qpn |= (1 << 23); in create_qp_common()
1190 qp->doorbell_qpn = swab32(qp->mqp.qpn << 8); in create_qp_common()
1192 qp->mqp.event = mlx4_ib_qp_event; in create_qp_common()
1350 MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp)) in destroy_qp_rss()
1352 qp->mqp.qpn); in destroy_qp_rss()
1355 mlx4_qp_remove(dev->dev, &qp->mqp); in destroy_qp_rss()
1356 mlx4_qp_free(dev->dev, &qp->mqp); in destroy_qp_rss()
1357 mlx4_qp_release_range(dev->dev, qp->mqp.qpn, 1); in destroy_qp_rss()
1370 MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp)) in destroy_qp_common()
1372 qp->mqp.qpn); in destroy_qp_common()
1406 __mlx4_ib_cq_clean(recv_cq, qp->mqp.qpn, in destroy_qp_common()
1409 __mlx4_ib_cq_clean(send_cq, qp->mqp.qpn, NULL); in destroy_qp_common()
1412 mlx4_qp_remove(dev->dev, &qp->mqp); in destroy_qp_common()
1417 mlx4_qp_free(dev->dev, &qp->mqp); in destroy_qp_common()
1421 mlx4_ib_steer_qp_free(dev, qp->mqp.qpn, 1); in destroy_qp_common()
1430 mlx4_qp_release_range(dev->dev, qp->mqp.qpn, 1); in destroy_qp_common()
1541 qp->ibqp.qp_num = qp->mqp.qpn; in _mlx4_ib_create_qp()
1624 struct mlx4_ib_qp *mqp = to_mqp(qp); in _mlx4_ib_destroy_qp() local
1626 if (is_qp0(dev, mqp)) in _mlx4_ib_destroy_qp()
1627 mlx4_CLOSE_PORT(dev->dev, mqp->port); in _mlx4_ib_destroy_qp()
1629 if (mqp->mlx4_ib_qp_type == MLX4_IB_QPT_PROXY_GSI && in _mlx4_ib_destroy_qp()
1630 dev->qp1_proxy[mqp->port - 1] == mqp) { in _mlx4_ib_destroy_qp()
1631 mutex_lock(&dev->qp1_proxy_lock[mqp->port - 1]); in _mlx4_ib_destroy_qp()
1632 dev->qp1_proxy[mqp->port - 1] = NULL; in _mlx4_ib_destroy_qp()
1633 mutex_unlock(&dev->qp1_proxy_lock[mqp->port - 1]); in _mlx4_ib_destroy_qp()
1636 if (mqp->counter_index) in _mlx4_ib_destroy_qp()
1637 mlx4_ib_free_qp_counter(dev, mqp); in _mlx4_ib_destroy_qp()
1640 destroy_qp_rss(dev, mqp); in _mlx4_ib_destroy_qp()
1642 destroy_qp_common(dev, mqp, MLX4_IB_QP_SRC, udata); in _mlx4_ib_destroy_qp()
1645 kfree(mqp->sqp); in _mlx4_ib_destroy_qp()
1651 struct mlx4_ib_qp *mqp = to_mqp(qp); in mlx4_ib_destroy_qp() local
1653 if (mqp->mlx4_ib_qp_type == MLX4_IB_QPT_GSI) { in mlx4_ib_destroy_qp()
1654 struct mlx4_ib_sqp *sqp = mqp->sqp; in mlx4_ib_destroy_qp()
1853 struct mlx4_ib_qp *mqp, in mlx4_set_path() argument
1860 path, &mqp->pri, port); in mlx4_set_path()
1866 struct mlx4_ib_qp *mqp, in mlx4_set_alt_path() argument
1872 path, &mqp->alt, port); in mlx4_set_alt_path()
2498 sqd_event, &qp->mqp); in __mlx4_ib_modify_qp()
2539 mlx4_ib_cq_clean(recv_cq, qp->mqp.qpn, in __mlx4_ib_modify_qp()
2542 mlx4_ib_cq_clean(send_cq, qp->mqp.qpn, NULL); in __mlx4_ib_modify_qp()
2787 struct mlx4_ib_qp *mqp = to_mqp(ibqp); in mlx4_ib_modify_qp() local
2795 if (mqp->mlx4_ib_qp_type == MLX4_IB_QPT_GSI) { in mlx4_ib_modify_qp()
2796 struct mlx4_ib_sqp *sqp = mqp->sqp; in mlx4_ib_modify_qp()
2883 if (mlx4_get_parav_qkey(mdev->dev, qp->mqp.qpn, &qkey)) in build_sriov_qp0_header()
2886 if (vf_get_qp0_qkey(mdev->dev, qp->mqp.qpn, &qkey)) in build_sriov_qp0_header()
2890 sqp->ud_header.deth.source_qpn = cpu_to_be32(qp->mqp.qpn); in build_sriov_qp0_header()
3990 err = mlx4_qp_query(dev->dev, &qp->mqp, &context); in mlx4_ib_query_qp()
4147 qp->ibwq.wq_num = qp->mqp.qpn; in mlx4_ib_create_wq()