• Home
  • Raw
  • Download

Lines Matching refs:init_attr

518 		      struct ib_qp_init_attr *init_attr,  in set_qp_rss()  argument
521 rss_ctx->base_qpn_tbl_sz = init_attr->rwq_ind_tbl->ind_tbl[0]->wq_num | in set_qp_rss()
522 (init_attr->rwq_ind_tbl->log_ind_tbl_size << 24); in set_qp_rss()
620 struct ib_qp_init_attr *init_attr, in create_qp_rss() argument
649 (struct ib_qp *)init_attr->rwq_ind_tbl->ind_tbl[0]))->mtt; in create_qp_rss()
657 err = set_qp_rss(dev, qp->rss_ctx, init_attr, ucmd); in create_qp_rss()
676 struct ib_qp_init_attr *init_attr, in _mlx4_ib_create_qp_rss() argument
716 if (init_attr->qp_type != IB_QPT_RAW_PACKET) { in _mlx4_ib_create_qp_rss()
718 init_attr->qp_type); in _mlx4_ib_create_qp_rss()
722 if (init_attr->create_flags) { in _mlx4_ib_create_qp_rss()
727 if (init_attr->send_cq || init_attr->cap.max_send_wr) { in _mlx4_ib_create_qp_rss()
735 err = create_qp_rss(to_mdev(pd->device), init_attr, &ucmd, qp); in _mlx4_ib_create_qp_rss()
826 static int create_rq(struct ib_pd *pd, struct ib_qp_init_attr *init_attr, in create_rq() argument
873 if (init_attr->create_flags & IB_QP_CREATE_SCATTER_FCS) in create_rq()
876 err = set_rq_size(dev, &init_attr->cap, true, true, qp, qp->inl_recv_sz); in create_rq()
925 mlx4_ib_lock_cqs(to_mcq(init_attr->send_cq), in create_rq()
926 to_mcq(init_attr->recv_cq)); in create_rq()
934 mcq = to_mcq(init_attr->send_cq); in create_rq()
936 mcq = to_mcq(init_attr->recv_cq); in create_rq()
938 mlx4_ib_unlock_cqs(to_mcq(init_attr->send_cq), in create_rq()
939 to_mcq(init_attr->recv_cq)); in create_rq()
956 static int create_qp_common(struct ib_pd *pd, struct ib_qp_init_attr *init_attr, in create_qp_common() argument
965 enum mlx4_ib_qp_type qp_type = (enum mlx4_ib_qp_type) init_attr->qp_type; in create_qp_common()
973 !(init_attr->create_flags & MLX4_IB_SRIOV_SQP))) { in create_qp_common()
974 if (init_attr->qp_type == IB_QPT_GSI) in create_qp_common()
986 init_attr->cap.max_recv_sge++; in create_qp_common()
987 } else if (init_attr->create_flags & MLX4_IB_SRIOV_TUNNEL_QP) { in create_qp_common()
989 container_of(init_attr, in create_qp_common()
990 struct mlx4_ib_qp_tunnel_init_attr, init_attr); in create_qp_common()
1010 if (init_attr->qp_type == IB_QPT_SMI || in create_qp_common()
1011 init_attr->qp_type == IB_QPT_GSI || qp_type == MLX4_IB_QPT_SMI || in create_qp_common()
1028 if (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR) in create_qp_common()
1046 if (init_attr->create_flags & IB_QP_CREATE_SCATTER_FCS) { in create_qp_common()
1057 err = set_rq_size(dev, &init_attr->cap, udata, in create_qp_common()
1058 qp_has_rq(init_attr), qp, qp->inl_recv_sz); in create_qp_common()
1085 if (qp_has_rq(init_attr)) { in create_qp_common()
1092 err = set_rq_size(dev, &init_attr->cap, udata, in create_qp_common()
1093 qp_has_rq(init_attr), qp, 0); in create_qp_common()
1099 if (init_attr->create_flags & IB_QP_CREATE_IPOIB_UD_LSO) in create_qp_common()
1102 if (init_attr->create_flags & IB_QP_CREATE_NETIF_QP) { in create_qp_common()
1112 err = set_kernel_sq_size(dev, &init_attr->cap, qp_type, qp); in create_qp_common()
1116 if (qp_has_rq(init_attr)) { in create_qp_common()
1162 if (init_attr->qp_type == IB_QPT_RAW_PACKET) in create_qp_common()
1164 (init_attr->cap.max_send_wr ? in create_qp_common()
1166 (init_attr->cap.max_recv_wr ? in create_qp_common()
1179 if (init_attr->create_flags & IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK) in create_qp_common()
1186 if (init_attr->qp_type == IB_QPT_XRC_TGT) in create_qp_common()
1199 mlx4_ib_lock_cqs(to_mcq(init_attr->send_cq), in create_qp_common()
1200 to_mcq(init_attr->recv_cq)); in create_qp_common()
1208 mcq = to_mcq(init_attr->send_cq); in create_qp_common()
1210 mcq = to_mcq(init_attr->recv_cq); in create_qp_common()
1212 mlx4_ib_unlock_cqs(to_mcq(init_attr->send_cq), in create_qp_common()
1213 to_mcq(init_attr->recv_cq)); in create_qp_common()
1229 if (qp_has_rq(init_attr)) in create_qp_common()
1245 if (!udata && qp_has_rq(init_attr)) in create_qp_common()
1482 struct ib_qp_init_attr *init_attr, in _mlx4_ib_create_qp() argument
1489 if (init_attr->rwq_ind_tbl) in _mlx4_ib_create_qp()
1490 return _mlx4_ib_create_qp_rss(pd, qp, init_attr, udata); in _mlx4_ib_create_qp()
1496 if (init_attr->create_flags & ~(MLX4_IB_QP_LSO | in _mlx4_ib_create_qp()
1504 if (init_attr->create_flags & IB_QP_CREATE_NETIF_QP) { in _mlx4_ib_create_qp()
1505 if (init_attr->qp_type != IB_QPT_UD) in _mlx4_ib_create_qp()
1509 if (init_attr->create_flags) { in _mlx4_ib_create_qp()
1510 if (udata && init_attr->create_flags & ~(sup_u_create_flags)) in _mlx4_ib_create_qp()
1513 if ((init_attr->create_flags & ~(MLX4_IB_SRIOV_SQP | in _mlx4_ib_create_qp()
1516 init_attr->qp_type != IB_QPT_UD) || in _mlx4_ib_create_qp()
1517 (init_attr->create_flags & MLX4_IB_SRIOV_SQP && in _mlx4_ib_create_qp()
1518 init_attr->qp_type > IB_QPT_GSI) || in _mlx4_ib_create_qp()
1519 (init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI && in _mlx4_ib_create_qp()
1520 init_attr->qp_type != IB_QPT_GSI)) in _mlx4_ib_create_qp()
1524 switch (init_attr->qp_type) { in _mlx4_ib_create_qp()
1526 pd = to_mxrcd(init_attr->xrcd)->pd; in _mlx4_ib_create_qp()
1527 xrcdn = to_mxrcd(init_attr->xrcd)->xrcdn; in _mlx4_ib_create_qp()
1528 init_attr->send_cq = to_mxrcd(init_attr->xrcd)->cq; in _mlx4_ib_create_qp()
1533 init_attr->recv_cq = init_attr->send_cq; in _mlx4_ib_create_qp()
1541 err = create_qp_common(pd, init_attr, udata, 0, qp); in _mlx4_ib_create_qp()
1553 if (init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI) { in _mlx4_ib_create_qp()
1561 sqpn = get_sqp_num(to_mdev(pd->device), init_attr); in _mlx4_ib_create_qp()
1566 err = create_qp_common(pd, init_attr, udata, sqpn, qp); in _mlx4_ib_create_qp()
1570 qp->port = init_attr->port_num; in _mlx4_ib_create_qp()
1571 qp->ibqp.qp_num = init_attr->qp_type == IB_QPT_SMI ? 0 : in _mlx4_ib_create_qp()
1572 init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI ? sqpn : 1; in _mlx4_ib_create_qp()
1583 struct ib_qp_init_attr *init_attr, in mlx4_ib_create_qp() argument
1585 struct ib_device *device = pd ? pd->device : init_attr->xrcd->device; in mlx4_ib_create_qp()
1595 ret = _mlx4_ib_create_qp(pd, qp, init_attr, udata); in mlx4_ib_create_qp()
1601 if (init_attr->qp_type == IB_QPT_GSI && in mlx4_ib_create_qp()
1602 !(init_attr->create_flags & MLX4_IB_QP_CREATE_ROCE_V2_GSI)) { in mlx4_ib_create_qp()
1604 int is_eth = rdma_cap_eth_ah(&dev->ib_dev, init_attr->port_num); in mlx4_ib_create_qp()
1608 init_attr->create_flags |= MLX4_IB_QP_CREATE_ROCE_V2_GSI; in mlx4_ib_create_qp()
1609 sqp->roce_v2_gsi = ib_create_qp(pd, init_attr); in mlx4_ib_create_qp()
1619 init_attr->create_flags &= ~MLX4_IB_QP_CREATE_ROCE_V2_GSI; in mlx4_ib_create_qp()
4085 struct ib_wq_init_attr *init_attr, in mlx4_ib_create_wq() argument
4114 if (init_attr->wq_type != IB_WQT_RQ) { in mlx4_ib_create_wq()
4115 pr_debug("unsupported wq type %d\n", init_attr->wq_type); in mlx4_ib_create_wq()
4119 if (init_attr->create_flags & ~IB_WQ_FLAGS_SCATTER_FCS || in mlx4_ib_create_wq()
4122 init_attr->create_flags); in mlx4_ib_create_wq()
4134 ib_qp_init_attr.qp_context = init_attr->wq_context; in mlx4_ib_create_wq()
4136 ib_qp_init_attr.cap.max_recv_wr = init_attr->max_wr; in mlx4_ib_create_wq()
4137 ib_qp_init_attr.cap.max_recv_sge = init_attr->max_sge; in mlx4_ib_create_wq()
4138 ib_qp_init_attr.recv_cq = init_attr->cq; in mlx4_ib_create_wq()
4141 if (init_attr->create_flags & IB_WQ_FLAGS_SCATTER_FCS) in mlx4_ib_create_wq()
4150 qp->ibwq.event_handler = init_attr->event_handler; in mlx4_ib_create_wq()
4296 struct ib_rwq_ind_table_init_attr *init_attr, in mlx4_ib_create_rwq_ind_table() argument
4300 unsigned int ind_tbl_size = 1 << init_attr->log_ind_tbl_size; in mlx4_ib_create_rwq_ind_table()
4323 base_wqn = init_attr->ind_tbl[0]->wq_num; in mlx4_ib_create_rwq_ind_table()
4332 if (++base_wqn != init_attr->ind_tbl[i]->wq_num) { in mlx4_ib_create_rwq_ind_table()