Lines Matching refs:recv_cq

970 		rcqe_sz = mlx5_ib_get_cqe_size(dev, init_attr->recv_cq);  in create_qp_common()
1024 if (init_attr->recv_cq) in create_qp_common()
1025 in->ctx.cqn_recv = cpu_to_be32(to_mcq(init_attr->recv_cq)->mcq.cqn); in create_qp_common()
1056 static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_lock_cqs() argument
1057 __acquires(&send_cq->lock) __acquires(&recv_cq->lock) in mlx5_ib_lock_cqs()
1060 if (recv_cq) { in mlx5_ib_lock_cqs()
1061 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
1063 spin_lock_nested(&recv_cq->lock, in mlx5_ib_lock_cqs()
1065 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
1067 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
1069 spin_lock_irq(&recv_cq->lock); in mlx5_ib_lock_cqs()
1075 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
1077 } else if (recv_cq) { in mlx5_ib_lock_cqs()
1078 spin_lock_irq(&recv_cq->lock); in mlx5_ib_lock_cqs()
1082 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
1086 static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_unlock_cqs() argument
1087 __releases(&send_cq->lock) __releases(&recv_cq->lock) in mlx5_ib_unlock_cqs()
1090 if (recv_cq) { in mlx5_ib_unlock_cqs()
1091 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
1092 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1094 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
1095 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1099 spin_unlock_irq(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1102 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1105 } else if (recv_cq) { in mlx5_ib_unlock_cqs()
1107 spin_unlock_irq(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1109 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1120 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq) in get_cqs() argument
1125 *recv_cq = NULL; in get_cqs()
1130 *recv_cq = NULL; in get_cqs()
1141 *recv_cq = to_mcq(qp->ibqp.recv_cq); in get_cqs()
1148 *recv_cq = NULL; in get_cqs()
1155 struct mlx5_ib_cq *send_cq, *recv_cq; in destroy_qp_common() local
1171 get_cqs(qp, &send_cq, &recv_cq); in destroy_qp_common()
1174 mlx5_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
1175 __mlx5_ib_cq_clean(recv_cq, qp->mqp.qpn, in destroy_qp_common()
1177 if (send_cq != recv_cq) in destroy_qp_common()
1179 mlx5_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
1256 init_attr->recv_cq = NULL; in mlx5_ib_create_qp()
1288 qp->ibqp.qp_num, qp->mqp.qpn, to_mcq(init_attr->recv_cq)->mcq.cqn, in mlx5_ib_create_qp()
1571 struct mlx5_ib_cq *send_cq, *recv_cq; in __mlx5_ib_modify_qp() local
1658 get_cqs(qp, &send_cq, &recv_cq); in __mlx5_ib_modify_qp()
1662 context->cqn_recv = recv_cq ? cpu_to_be32(recv_cq->mcq.cqn) : 0; in __mlx5_ib_modify_qp()
1754 mlx5_ib_cq_clean(recv_cq, qp->mqp.qpn, in __mlx5_ib_modify_qp()
1756 if (send_cq != recv_cq) in __mlx5_ib_modify_qp()
2912 if (mlx5_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { in mlx5_ib_post_recv()