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,
1213 static int get_sq_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq) in get_sq_ts_format() argument
1217 return get_ts_format(dev, send_cq, fr_supported(ts_cap), in get_sq_ts_format()
1221 static int get_qp_ts_format(struct mlx5_ib_dev *dev, struct mlx5_ib_cq *send_cq, in get_qp_ts_format() argument
1230 send_cq ? get_ts_format(dev, send_cq, fr_sup, rt_sup) : in get_qp_ts_format()
1507 to_mcq(init_attr->send_cq)); in create_raw_packet_qp()
1848 scqe_sz = mlx5_ib_get_cqe_size(init_attr->send_cq); in configure_requester_scat_cqe()
1994 struct mlx5_ib_cq *send_cq; in create_dci() local
2030 ts_format = get_qp_ts_format(dev, to_mcq(init_attr->send_cq), in create_dci()
2087 if (init_attr->send_cq) in create_dci()
2089 to_mcq(init_attr->send_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()
2129 if (send_cq) in create_dci()
2130 list_add_tail(&qp->cq_send_list, &send_cq->list_send_qp); in create_dci()
2133 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_dci()
2155 struct mlx5_ib_cq *send_cq; in create_user_qp() local
2198 ts_format = get_qp_ts_format(dev, to_mcq(init_attr->send_cq), in create_user_qp()
2284 if (init_attr->send_cq) in create_user_qp()
2285 MLX5_SET(qpc, qpc, cqn_snd, to_mcq(init_attr->send_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()
2332 if (send_cq) in create_user_qp()
2333 list_add_tail(&qp->cq_send_list, &send_cq->list_send_qp); in create_user_qp()
2336 mlx5_ib_unlock_cqs(send_cq, recv_cq); in create_user_qp()
2356 struct mlx5_ib_cq *send_cq; in create_kernel_qp() local
2427 if (attr->send_cq) in create_kernel_qp()
2428 MLX5_SET(qpc, qpc, cqn_snd, to_mcq(attr->send_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()
2461 if (send_cq) in create_kernel_qp()
2462 list_add_tail(&qp->cq_send_list, &send_cq->list_send_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()
2478 if (send_cq) { in mlx5_ib_lock_cqs()
2480 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2481 spin_lock(&send_cq->lock); in mlx5_ib_lock_cqs()
2484 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_lock_cqs()
2485 spin_lock(&send_cq->lock); in mlx5_ib_lock_cqs()
2489 spin_lock_nested(&send_cq->lock, in mlx5_ib_lock_cqs()
2493 spin_lock(&send_cq->lock); in mlx5_ib_lock_cqs()
2498 __acquire(&send_cq->lock); in mlx5_ib_lock_cqs()
2500 __acquire(&send_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()
2508 if (send_cq) { in mlx5_ib_unlock_cqs()
2510 if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2512 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2513 } else if (send_cq->mcq.cqn == recv_cq->mcq.cqn) { in mlx5_ib_unlock_cqs()
2515 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2517 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2522 spin_unlock(&send_cq->lock); in mlx5_ib_unlock_cqs()
2525 __release(&send_cq->lock); in mlx5_ib_unlock_cqs()
2529 __release(&send_cq->lock); in mlx5_ib_unlock_cqs()
2535 struct mlx5_ib_cq **send_cq, struct mlx5_ib_cq **recv_cq) in get_cqs() argument
2539 *send_cq = NULL; in get_cqs()
2544 *send_cq = ib_send_cq ? to_mcq(ib_send_cq) : NULL; in get_cqs()
2554 *send_cq = ib_send_cq ? to_mcq(ib_send_cq) : NULL; in get_cqs()
2558 *send_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()
2607 mlx5_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
2610 if (send_cq) in destroy_qp_common()
2619 if (send_cq != recv_cq) in destroy_qp_common()
2620 __mlx5_ib_cq_clean(send_cq, base->mqp.qpn, in destroy_qp_common()
2623 mlx5_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
3050 params->attr->send_cq ? to_mcq(params->attr->send_cq)->mcq.cqn : in create_qp()
3072 ret = (attr->rwq_ind_tbl && attr->send_cq) ? -EINVAL : 0; in check_qp_attr()
4061 struct mlx5_ib_cq *send_cq, *recv_cq; in __mlx5_ib_modify_qp() local
4167 get_cqs(qp->type, qp->ibqp.send_cq, qp->ibqp.recv_cq, in __mlx5_ib_modify_qp()
4168 &send_cq, &recv_cq); in __mlx5_ib_modify_qp()
4171 if (send_cq) in __mlx5_ib_modify_qp()
4172 MLX5_SET(qpc, qpc, cqn_snd, send_cq->mcq.cqn); in __mlx5_ib_modify_qp()
4322 if (send_cq != recv_cq) in __mlx5_ib_modify_qp()
4323 mlx5_ib_cq_clean(send_cq, base->mqp.qpn, NULL); in __mlx5_ib_modify_qp()
5024 qp_init_attr->send_cq = ibqp->send_cq; in mlx5_ib_query_qp()
5648 struct ib_cq *cq = qp->send_cq; in mlx5_ib_drain_sq()