Lines Matching refs:send_cq
75 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq);
744 static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq,
746 static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq,
1784 scqe_sz = mlx5_ib_get_cqe_size(init_attr->send_cq); in configure_requester_scat_cqe()
1929 struct mlx5_ib_cq *send_cq; in create_user_qp() local
2047 if (init_attr->send_cq) in create_user_qp()
2048 MLX5_SET(qpc, qpc, cqn_snd, to_mcq(init_attr->send_cq)->mcq.cqn); in create_user_qp()
2085 get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq, in create_user_qp()
2086 &send_cq, &recv_cq); in create_user_qp()
2088 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_user_qp()
2095 if (send_cq) in create_user_qp()
2096 list_add_tail(&qp->cq_send_list, &send_cq->list_send_qp); in create_user_qp()
2099 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_user_qp()
2119 struct mlx5_ib_cq *send_cq; in create_kernel_qp() local
2190 if (attr->send_cq) in create_kernel_qp()
2191 MLX5_SET(qpc, qpc, cqn_snd, to_mcq(attr->send_cq)->mcq.cqn); in create_kernel_qp()
2214 get_cqs(qp->type, attr->send_cq, attr->recv_cq, in create_kernel_qp()
2215 &send_cq, &recv_cq); in create_kernel_qp()
2217 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_kernel_qp()
2224 if (send_cq) in create_kernel_qp()
2225 list_add_tail(&qp->cq_send_list, &send_cq->list_send_qp); in create_kernel_qp()
2228 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_kernel_qp()
2238 static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_lock_cqs() argument
2239 __acquires(&send_cq->lock) __acquires(&recv_cq->lock) in mlx5_ib_lock_cqs()
2241 if (send_cq) { in mlx5_ib_lock_cqs()
2243 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2244 spin_lock(&send_cq->lock); in mlx5_ib_lock_cqs()
2247 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2248 spin_lock(&send_cq->lock); in mlx5_ib_lock_cqs()
2252 spin_lock_nested(&send_cq->lock, in mlx5_ib_lock_cqs()
2256 spin_lock(&send_cq->lock); in mlx5_ib_lock_cqs()
2261 __acquire(&send_cq->lock); in mlx5_ib_lock_cqs()
2263 __acquire(&send_cq->lock); in mlx5_ib_lock_cqs()
2268 static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_unlock_cqs() argument
2269 __releases(&send_cq->lock) __releases(&recv_cq->lock) in mlx5_ib_unlock_cqs()
2271 if (send_cq) { in mlx5_ib_unlock_cqs()
2273 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2275 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2276 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2278 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2280 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2285 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2288 __release(&send_cq->lock); in mlx5_ib_unlock_cqs()
2292 __release(&send_cq->lock); in mlx5_ib_unlock_cqs()
2298 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq) in get_cqs() argument
2302 *send_cq = NULL; in get_cqs()
2307 *send_cq = ib_send_cq ? to_mcq(ib_send_cq) : NULL; in get_cqs()
2317 *send_cq = ib_send_cq ? to_mcq(ib_send_cq) : NULL; in get_cqs()
2321 *send_cq = NULL; in get_cqs()
2334 struct mlx5_ib_cq *send_cq, *recv_cq; in destroy_qp_common() local
2366 get_cqs(qp->type, qp->ibqp.send_cq, qp->ibqp.recv_cq, &send_cq, in destroy_qp_common()
2370 mlx5_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
2373 if (send_cq) in destroy_qp_common()
2382 if (send_cq != recv_cq) in destroy_qp_common()
2383 __mlx5_ib_cq_clean(send_cq, base->mqp.qpn, in destroy_qp_common()
2386 mlx5_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
2802 params->attr->send_cq ? to_mcq(params->attr->send_cq)->mcq.cqn : in create_qp()
2824 ret = (attr->rwq_ind_tbl && attr->send_cq) ? -EINVAL : 0; in check_qp_attr()
3003 qp->ibqp.send_cq = attr->send_cq; in mlx5_ib_create_qp()
3792 struct mlx5_ib_cq *send_cq, *recv_cq; in __mlx5_ib_modify_qp() local
3898 get_cqs(qp->ibqp.qp_type, qp->ibqp.send_cq, qp->ibqp.recv_cq, in __mlx5_ib_modify_qp()
3899 &send_cq, &recv_cq); in __mlx5_ib_modify_qp()
3902 if (send_cq) in __mlx5_ib_modify_qp()
3903 MLX5_SET(qpc, qpc, cqn_snd, send_cq->mcq.cqn); in __mlx5_ib_modify_qp()
4053 if (send_cq != recv_cq) in __mlx5_ib_modify_qp()
4054 mlx5_ib_cq_clean(send_cq, base->mqp.qpn, NULL); in __mlx5_ib_modify_qp()
4741 qp_init_attr->send_cq = ibqp->send_cq; in mlx5_ib_query_qp()
5359 struct ib_cq *cq = qp->send_cq; in mlx5_ib_drain_sq()