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);
1205 static int get_rq_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *recv_cq) in get_rq_ts_format() argument
1209 return get_ts_format(dev, recv_cq, fr_supported(ts_cap), in get_rq_ts_format()
1222 struct mlx5_ib_cq *recv_cq) in get_qp_ts_format() argument
1233 recv_cq ? get_ts_format(dev, recv_cq, fr_sup, rt_sup) : in get_qp_ts_format()
1530 to_mcq(init_attr->recv_cq)); in create_raw_packet_qp()
1995 struct mlx5_ib_cq *recv_cq; in create_dci() local
2031 to_mcq(init_attr->recv_cq)); in create_dci()
2091 if (init_attr->recv_cq) in create_dci()
2093 to_mcq(init_attr->recv_cq)->mcq.cqn); in create_dci()
2119 get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq, in create_dci()
2120 &send_cq, &recv_cq); in create_dci()
2122 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_dci()
2131 if (recv_cq) in create_dci()
2132 list_add_tail(&qp->cq_recv_list, &recv_cq->list_recv_qp); in create_dci()
2133 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_dci()
2156 struct mlx5_ib_cq *recv_cq; in create_user_qp() local
2199 to_mcq(init_attr->recv_cq)); in create_user_qp()
2237 int rcqe_sz = mlx5_ib_get_cqe_size(init_attr->recv_cq); in create_user_qp()
2287 if (init_attr->recv_cq) in create_user_qp()
2288 MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(init_attr->recv_cq)->mcq.cqn); in create_user_qp()
2322 get_cqs(qp->type, init_attr->send_cq, init_attr->recv_cq, in create_user_qp()
2323 &send_cq, &recv_cq); in create_user_qp()
2325 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_user_qp()
2334 if (recv_cq) in create_user_qp()
2335 list_add_tail(&qp->cq_recv_list, &recv_cq->list_recv_qp); in create_user_qp()
2336 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_user_qp()
2357 struct mlx5_ib_cq *recv_cq; in create_kernel_qp() local
2430 if (attr->recv_cq) in create_kernel_qp()
2431 MLX5_SET(qpc, qpc, cqn_rcv, to_mcq(attr->recv_cq)->mcq.cqn); in create_kernel_qp()
2451 get_cqs(qp->type, attr->send_cq, attr->recv_cq, in create_kernel_qp()
2452 &send_cq, &recv_cq); in create_kernel_qp()
2454 mlx5_ib_lock_cqs(send_cq, recv_cq); in create_kernel_qp()
2463 if (recv_cq) in create_kernel_qp()
2464 list_add_tail(&qp->cq_recv_list, &recv_cq->list_recv_qp); in create_kernel_qp()
2465 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_kernel_qp()
2475 static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_lock_cqs() argument
2476 __acquires(&send_cq->lock) __acquires(&recv_cq->lock) in mlx5_ib_lock_cqs()
2479 if (recv_cq) { in mlx5_ib_lock_cqs()
2480 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2482 spin_lock_nested(&recv_cq->lock, in mlx5_ib_lock_cqs()
2484 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2486 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
2488 spin_lock(&recv_cq->lock); in mlx5_ib_lock_cqs()
2494 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
2496 } else if (recv_cq) { in mlx5_ib_lock_cqs()
2497 spin_lock(&recv_cq->lock); in mlx5_ib_lock_cqs()
2501 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
2505 static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_unlock_cqs() argument
2506 __releases(&send_cq->lock) __releases(&recv_cq->lock) in mlx5_ib_unlock_cqs()
2509 if (recv_cq) { in mlx5_ib_unlock_cqs()
2510 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2511 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2513 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2514 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2518 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2521 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2524 } else if (recv_cq) { in mlx5_ib_unlock_cqs()
2526 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2528 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
2535 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq) in get_cqs() argument
2540 *recv_cq = NULL; in get_cqs()
2545 *recv_cq = NULL; in get_cqs()
2555 *recv_cq = ib_recv_cq ? to_mcq(ib_recv_cq) : NULL; in get_cqs()
2559 *recv_cq = NULL; in get_cqs()
2571 struct mlx5_ib_cq *send_cq, *recv_cq; in destroy_qp_common() local
2603 get_cqs(qp->type, qp->ibqp.send_cq, qp->ibqp.recv_cq, &send_cq, in destroy_qp_common()
2604 &recv_cq); in destroy_qp_common()
2607 mlx5_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
2613 if (recv_cq) in destroy_qp_common()
2617 __mlx5_ib_cq_clean(recv_cq, base->mqp.qpn, in destroy_qp_common()
2619 if (send_cq != recv_cq) in destroy_qp_common()
2623 mlx5_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
2659 MLX5_SET(dctc, dctc, cqn, to_mcq(attr->recv_cq)->mcq.cqn); in create_dct()
2666 int rcqe_sz = mlx5_ib_get_cqe_size(attr->recv_cq); in create_dct()
3048 params->attr->recv_cq ? to_mcq(params->attr->recv_cq)->mcq.cqn : in create_qp()
3064 ret = (!attr->srq || !attr->recv_cq) ? -EINVAL : 0; in check_qp_attr()
4034 struct mlx5_ib_cq *send_cq, *recv_cq; in __mlx5_ib_modify_qp() local
4140 get_cqs(qp->type, qp->ibqp.send_cq, qp->ibqp.recv_cq, in __mlx5_ib_modify_qp()
4141 &send_cq, &recv_cq); in __mlx5_ib_modify_qp()
4146 if (recv_cq) in __mlx5_ib_modify_qp()
4147 MLX5_SET(qpc, qpc, cqn_rcv, recv_cq->mcq.cqn); in __mlx5_ib_modify_qp()
4293 mlx5_ib_cq_clean(recv_cq, base->mqp.qpn, in __mlx5_ib_modify_qp()
4295 if (send_cq != recv_cq) in __mlx5_ib_modify_qp()
4975 qp_init_attr->recv_cq = ibqp->recv_cq; in mlx5_ib_query_qp()
5635 struct ib_cq *cq = qp->recv_cq; in mlx5_ib_drain_rq()