Lines Matching refs:recv_cq
961 rcqe_sz = mlx5_ib_get_cqe_size(dev, init_attr->recv_cq); in create_qp_common()
1016 if (init_attr->recv_cq) in create_qp_common()
1017 in->ctx.cqn_recv = cpu_to_be32(to_mcq(init_attr->recv_cq)->mcq.cqn); in create_qp_common()
1048 static void mlx5_ib_lock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_lock_cqs() argument
1049 __acquires(&send_cq->lock) __acquires(&recv_cq->lock) in mlx5_ib_lock_cqs()
1052 if (recv_cq) { in mlx5_ib_lock_cqs()
1053 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
1055 spin_lock_nested(&recv_cq->lock, in mlx5_ib_lock_cqs()
1057 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
1059 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
1061 spin_lock_irq(&recv_cq->lock); in mlx5_ib_lock_cqs()
1067 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
1069 } else if (recv_cq) { in mlx5_ib_lock_cqs()
1070 spin_lock_irq(&recv_cq->lock); in mlx5_ib_lock_cqs()
1074 __acquire(&recv_cq->lock); in mlx5_ib_lock_cqs()
1078 static void mlx5_ib_unlock_cqs(struct mlx5_ib_cq *send_cq, struct mlx5_ib_cq *recv_cq) in mlx5_ib_unlock_cqs() argument
1079 __releases(&send_cq->lock) __releases(&recv_cq->lock) in mlx5_ib_unlock_cqs()
1082 if (recv_cq) { in mlx5_ib_unlock_cqs()
1083 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
1084 spin_unlock(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1086 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
1087 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1091 spin_unlock_irq(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1094 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1097 } else if (recv_cq) { in mlx5_ib_unlock_cqs()
1099 spin_unlock_irq(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1101 __release(&recv_cq->lock); in mlx5_ib_unlock_cqs()
1112 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq) in get_cqs() argument
1117 *recv_cq = NULL; in get_cqs()
1122 *recv_cq = NULL; in get_cqs()
1133 *recv_cq = to_mcq(qp->ibqp.recv_cq); in get_cqs()
1140 *recv_cq = NULL; in get_cqs()
1147 struct mlx5_ib_cq *send_cq, *recv_cq; in destroy_qp_common() local
1163 get_cqs(qp, &send_cq, &recv_cq); in destroy_qp_common()
1166 mlx5_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
1167 __mlx5_ib_cq_clean(recv_cq, qp->mqp.qpn, in destroy_qp_common()
1169 if (send_cq != recv_cq) in destroy_qp_common()
1171 mlx5_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
1246 init_attr->recv_cq = NULL; in mlx5_ib_create_qp()
1278 qp->ibqp.qp_num, qp->mqp.qpn, to_mcq(init_attr->recv_cq)->mcq.cqn, in mlx5_ib_create_qp()
1558 struct mlx5_ib_cq *send_cq, *recv_cq; in __mlx5_ib_modify_qp() local
1644 get_cqs(qp, &send_cq, &recv_cq); in __mlx5_ib_modify_qp()
1648 context->cqn_recv = recv_cq ? cpu_to_be32(recv_cq->mcq.cqn) : 0; in __mlx5_ib_modify_qp()
1740 mlx5_ib_cq_clean(recv_cq, qp->mqp.qpn, in __mlx5_ib_modify_qp()
1742 if (send_cq != recv_cq) in __mlx5_ib_modify_qp()
2903 if (mlx5_wq_overflow(&qp->rq, nreq, qp->ibqp.recv_cq)) { in mlx5_ib_post_recv()