Lines Matching refs:init_attr

514 		      struct ib_qp_init_attr *init_attr,  in set_qp_rss()  argument
517 rss_ctx->base_qpn_tbl_sz = init_attr->rwq_ind_tbl->ind_tbl[0]->wq_num | in set_qp_rss()
518 (init_attr->rwq_ind_tbl->log_ind_tbl_size << 24); in set_qp_rss()
616 struct ib_qp_init_attr *init_attr, in create_qp_rss() argument
645 (struct ib_qp *)init_attr->rwq_ind_tbl->ind_tbl[0]))->mtt; in create_qp_rss()
653 err = set_qp_rss(dev, qp->rss_ctx, init_attr, ucmd); in create_qp_rss()
672 struct ib_qp_init_attr *init_attr, in _mlx4_ib_create_qp_rss() argument
712 if (init_attr->qp_type != IB_QPT_RAW_PACKET) { in _mlx4_ib_create_qp_rss()
714 init_attr->qp_type); in _mlx4_ib_create_qp_rss()
718 if (init_attr->create_flags) { in _mlx4_ib_create_qp_rss()
723 if (init_attr->send_cq || init_attr->cap.max_send_wr) { in _mlx4_ib_create_qp_rss()
731 err = create_qp_rss(to_mdev(pd->device), init_attr, &ucmd, qp); in _mlx4_ib_create_qp_rss()
822 static int create_rq(struct ib_pd *pd, struct ib_qp_init_attr *init_attr, in create_rq() argument
869 if (init_attr->create_flags & IB_QP_CREATE_SCATTER_FCS) in create_rq()
872 err = set_rq_size(dev, &init_attr->cap, true, true, qp, qp->inl_recv_sz); in create_rq()
921 mlx4_ib_lock_cqs(to_mcq(init_attr->send_cq), in create_rq()
922 to_mcq(init_attr->recv_cq)); in create_rq()
930 mcq = to_mcq(init_attr->send_cq); in create_rq()
932 mcq = to_mcq(init_attr->recv_cq); in create_rq()
934 mlx4_ib_unlock_cqs(to_mcq(init_attr->send_cq), in create_rq()
935 to_mcq(init_attr->recv_cq)); in create_rq()
952 static int create_qp_common(struct ib_pd *pd, struct ib_qp_init_attr *init_attr, in create_qp_common() argument
961 enum mlx4_ib_qp_type qp_type = (enum mlx4_ib_qp_type) init_attr->qp_type; in create_qp_common()
969 !(init_attr->create_flags & MLX4_IB_SRIOV_SQP))) { in create_qp_common()
970 if (init_attr->qp_type == IB_QPT_GSI) in create_qp_common()
982 init_attr->cap.max_recv_sge++; in create_qp_common()
983 } else if (init_attr->create_flags & MLX4_IB_SRIOV_TUNNEL_QP) { in create_qp_common()
985 container_of(init_attr, in create_qp_common()
986 struct mlx4_ib_qp_tunnel_init_attr, init_attr); in create_qp_common()
1006 if (init_attr->qp_type == IB_QPT_SMI || in create_qp_common()
1007 init_attr->qp_type == IB_QPT_GSI || qp_type == MLX4_IB_QPT_SMI || in create_qp_common()
1024 if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR) in create_qp_common()
1042 if (init_attr->create_flags & IB_QP_CREATE_SCATTER_FCS) { in create_qp_common()
1053 err = set_rq_size(dev, &init_attr->cap, udata, in create_qp_common()
1054 qp_has_rq(init_attr), qp, qp->inl_recv_sz); in create_qp_common()
1081 if (qp_has_rq(init_attr)) { in create_qp_common()
1088 err = set_rq_size(dev, &init_attr->cap, udata, in create_qp_common()
1089 qp_has_rq(init_attr), qp, 0); in create_qp_common()
1095 if (init_attr->create_flags & IB_QP_CREATE_IPOIB_UD_LSO) in create_qp_common()
1098 if (init_attr->create_flags & IB_QP_CREATE_NETIF_QP) { in create_qp_common()
1108 err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, qp); in create_qp_common()
1112 if (qp_has_rq(init_attr)) { in create_qp_common()
1158 if (init_attr->qp_type == IB_QPT_RAW_PACKET) in create_qp_common()
1160 (init_attr->cap.max_send_wr ? in create_qp_common()
1162 (init_attr->cap.max_recv_wr ? in create_qp_common()
1175 if (init_attr->create_flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) in create_qp_common()
1182 if (init_attr->qp_type == IB_QPT_XRC_TGT) in create_qp_common()
1195 mlx4_ib_lock_cqs(to_mcq(init_attr->send_cq), in create_qp_common()
1196 to_mcq(init_attr->recv_cq)); in create_qp_common()
1204 mcq = to_mcq(init_attr->send_cq); in create_qp_common()
1206 mcq = to_mcq(init_attr->recv_cq); in create_qp_common()
1208 mlx4_ib_unlock_cqs(to_mcq(init_attr->send_cq), in create_qp_common()
1209 to_mcq(init_attr->recv_cq)); in create_qp_common()
1225 if (qp_has_rq(init_attr)) in create_qp_common()
1241 if (!udata && qp_has_rq(init_attr)) in create_qp_common()
1478 struct ib_qp_init_attr *init_attr, in _mlx4_ib_create_qp() argument
1485 if (init_attr->rwq_ind_tbl) in _mlx4_ib_create_qp()
1486 return _mlx4_ib_create_qp_rss(pd, qp, init_attr, udata); in _mlx4_ib_create_qp()
1492 if (init_attr->create_flags & ~(MLX4_IB_QP_LSO | in _mlx4_ib_create_qp()
1500 if (init_attr->create_flags & IB_QP_CREATE_NETIF_QP) { in _mlx4_ib_create_qp()
1501 if (init_attr->qp_type != IB_QPT_UD) in _mlx4_ib_create_qp()
1505 if (init_attr->create_flags) { in _mlx4_ib_create_qp()
1506 if (udata && init_attr->create_flags & ~(sup_u_create_flags)) in _mlx4_ib_create_qp()
1509 if ((init_attr->create_flags & ~(MLX4_IB_SRIOV_SQP | in _mlx4_ib_create_qp()
1512 init_attr->qp_type != IB_QPT_UD) || in _mlx4_ib_create_qp()
1513 (init_attr->create_flags & MLX4_IB_SRIOV_SQP && in _mlx4_ib_create_qp()
1514 init_attr->qp_type > IB_QPT_GSI) || in _mlx4_ib_create_qp()
1515 (init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI && in _mlx4_ib_create_qp()
1516 init_attr->qp_type != IB_QPT_GSI)) in _mlx4_ib_create_qp()
1520 switch (init_attr->qp_type) { in _mlx4_ib_create_qp()
1522 pd = to_mxrcd(init_attr->xrcd)->pd; in _mlx4_ib_create_qp()
1523 xrcdn = to_mxrcd(init_attr->xrcd)->xrcdn; in _mlx4_ib_create_qp()
1524 init_attr->send_cq = to_mxrcd(init_attr->xrcd)->cq; in _mlx4_ib_create_qp()
1529 init_attr->recv_cq = init_attr->send_cq; in _mlx4_ib_create_qp()
1537 err = create_qp_common(pd, init_attr, udata, 0, qp); in _mlx4_ib_create_qp()
1549 if (init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI) { in _mlx4_ib_create_qp()
1557 sqpn = get_sqp_num(to_mdev(pd->device), init_attr); in _mlx4_ib_create_qp()
1562 err = create_qp_common(pd, init_attr, udata, sqpn, qp); in _mlx4_ib_create_qp()
1566 if (init_attr->create_flags & in _mlx4_ib_create_qp()
1571 qp->port = init_attr->port_num; in _mlx4_ib_create_qp()
1572 qp->ibqp.qp_num = init_attr->qp_type == IB_QPT_SMI ? 0 : in _mlx4_ib_create_qp()
1573 init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI ? sqpn : 1; in _mlx4_ib_create_qp()
1583 int mlx4_ib_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr, in mlx4_ib_create_qp() argument
1593 ret = _mlx4_ib_create_qp(pd, qp, init_attr, udata); in mlx4_ib_create_qp()
1597 if (init_attr->qp_type == IB_QPT_GSI && in mlx4_ib_create_qp()
1598 !(init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI)) { in mlx4_ib_create_qp()
1600 int is_eth = rdma_cap_eth_ah(&dev->ib_dev, init_attr->port_num); in mlx4_ib_create_qp()
1604 init_attr->create_flags |= MLX4_IB_QP_CREATE_ROCE_V2_GSI; in mlx4_ib_create_qp()
1605 sqp->roce_v2_gsi = ib_create_qp(pd, init_attr); in mlx4_ib_create_qp()
1615 init_attr->create_flags &= ~MLX4_IB_QP_CREATE_ROCE_V2_GSI; in mlx4_ib_create_qp()
4081 struct ib_wq_init_attr *init_attr, in mlx4_ib_create_wq() argument
4110 if (init_attr->wq_type != IB_WQT_RQ) { in mlx4_ib_create_wq()
4111 pr_debug("unsupported wq type %d\n", init_attr->wq_type); in mlx4_ib_create_wq()
4115 if (init_attr->create_flags & ~IB_WQ_FLAGS_SCATTER_FCS || in mlx4_ib_create_wq()
4118 init_attr->create_flags); in mlx4_ib_create_wq()
4130 ib_qp_init_attr.qp_context = init_attr->wq_context; in mlx4_ib_create_wq()
4132 ib_qp_init_attr.cap.max_recv_wr = init_attr->max_wr; in mlx4_ib_create_wq()
4133 ib_qp_init_attr.cap.max_recv_sge = init_attr->max_sge; in mlx4_ib_create_wq()
4134 ib_qp_init_attr.recv_cq = init_attr->cq; in mlx4_ib_create_wq()
4137 if (init_attr->create_flags & IB_WQ_FLAGS_SCATTER_FCS) in mlx4_ib_create_wq()
4146 qp->ibwq.event_handler = init_attr->event_handler; in mlx4_ib_create_wq()
4292 struct ib_rwq_ind_table_init_attr *init_attr, in mlx4_ib_create_rwq_ind_table() argument
4296 unsigned int ind_tbl_size = 1 << init_attr->log_ind_tbl_size; in mlx4_ib_create_rwq_ind_table()
4319 base_wqn = init_attr->ind_tbl[0]->wq_num; in mlx4_ib_create_rwq_ind_table()
4328 if (++base_wqn != init_attr->ind_tbl[i]->wq_num) { in mlx4_ib_create_rwq_ind_table()