Lines Matching refs:recv_cq

75 		    struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq);
745 struct mlx5_ib_cq *recv_cq);
747 struct mlx5_ib_cq *recv_cq);
1933 struct mlx5_ib_cq *recv_cq; in create_user_qp() local
2006 int rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq); in create_user_qp()
2053 if (init_attr->recv_cq) in create_user_qp()
2054 MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(init_attr->recv_cq)->mcq.cqn); in create_user_qp()
2088 get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq, in create_user_qp()
2089 &send_cq, &recv_cq); in create_user_qp()
2091 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_user_qp()
2100 if (recv_cq) in create_user_qp()
2101 list_add_tail(&qp->cq_recv_list, &recv_cq->list_recv_qp); in create_user_qp()
2102 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_user_qp()
2123 struct mlx5_ib_cq *recv_cq; in create_kernel_qp() local
2196 if (attr->recv_cq) in create_kernel_qp()
2197 MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(attr->recv_cq)->mcq.cqn); in create_kernel_qp()
2217 get_cqs(qp->type, attr->send_cq, attr->recv_cq, in create_kernel_qp()
2218 &send_cq, &recv_cq); in create_kernel_qp()
2220 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_kernel_qp()
2229 if (recv_cq) in create_kernel_qp()
2230 list_add_tail(&qp->cq_recv_list, &recv_cq->list_recv_qp); in create_kernel_qp()
2231 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_kernel_qp()
2241 static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_lock_cqs() argument
2242 __acquires(&send_cq->lock) __acquires(&recv_cq->lock) in mlx5_ib_lock_cqs()
2245 if (recv_cq) { in mlx5_ib_lock_cqs()
2246 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2248 spin_lock_nested(&recv_cq->lock, in mlx5_ib_lock_cqs()
2250 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2252 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
2254 spin_lock(&recv_cq->lock); in mlx5_ib_lock_cqs()
2260 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
2262 } else if (recv_cq) { in mlx5_ib_lock_cqs()
2263 spin_lock(&recv_cq->lock); in mlx5_ib_lock_cqs()
2267 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
2271 static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_unlock_cqs() argument
2272 __releases(&send_cq->lock) __releases(&recv_cq->lock) in mlx5_ib_unlock_cqs()
2275 if (recv_cq) { in mlx5_ib_unlock_cqs()
2276 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2277 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2279 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2280 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2284 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2287 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2290 } else if (recv_cq) { in mlx5_ib_unlock_cqs()
2292 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2294 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2301 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq) in get_cqs() argument
2306 *recv_cq = NULL; in get_cqs()
2311 *recv_cq = NULL; in get_cqs()
2321 *recv_cq = ib_recv_cq ? to_mcq(ib_recv_cq) : NULL; in get_cqs()
2325 *recv_cq = NULL; in get_cqs()
2337 struct mlx5_ib_cq *send_cq, *recv_cq; in destroy_qp_common() local
2369 get_cqs(qp->type, qp->ibqp.send_cq, qp->ibqp.recv_cq, &send_cq, in destroy_qp_common()
2370 &recv_cq); in destroy_qp_common()
2373 mlx5_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
2379 if (recv_cq) in destroy_qp_common()
2383 __mlx5_ib_cq_clean(recv_cq, base->mqp.qpn, in destroy_qp_common()
2385 if (send_cq != recv_cq) in destroy_qp_common()
2389 mlx5_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
2425 MLX5_SET(dctc, dctc, cqn, to_mcq(attr->recv_cq)->mcq.cqn); in create_dct()
2432 int rcqe_sz = mlx5_ib_get_cqe_size(attr->recv_cq); in create_dct()
2809 params->attr->recv_cq ? to_mcq(params->attr->recv_cq)->mcq.cqn : in create_qp()
2825 ret = (!attr->srq || !attr->recv_cq) ? -EINVAL : 0; in check_qp_attr()
3013 qp->ibqp.recv_cq = attr->recv_cq; in mlx5_ib_create_qp()
3788 struct mlx5_ib_cq *send_cq, *recv_cq; in __mlx5_ib_modify_qp() local
3894 get_cqs(qp->ibqp.qp_type, qp->ibqp.send_cq, qp->ibqp.recv_cq, in __mlx5_ib_modify_qp()
3895 &send_cq, &recv_cq); in __mlx5_ib_modify_qp()
3900 if (recv_cq) in __mlx5_ib_modify_qp()
3901 MLX5_SET(qpc, qpc, cqn_rcv, recv_cq->mcq.cqn); in __mlx5_ib_modify_qp()
4047 mlx5_ib_cq_clean(recv_cq, base->mqp.qpn, in __mlx5_ib_modify_qp()
4049 if (send_cq != recv_cq) in __mlx5_ib_modify_qp()
4714 qp_init_attr->recv_cq = ibqp->recv_cq; in mlx5_ib_query_qp()
5370 struct ib_cq *cq = qp->recv_cq; in mlx5_ib_drain_rq()