Lines Matching refs:mcq

46 static void mlx5_ib_cq_event(struct mlx5_core_cq *mcq, enum mlx5_event type)  in mlx5_ib_cq_event()  argument
48 struct mlx5_ib_cq *cq = container_of(mcq, struct mlx5_ib_cq, mcq); in mlx5_ib_cq_event()
55 type, mcq->cqn); in mlx5_ib_cq_event()
74 return get_cqe_from_buf(&cq->buf, n, cq->mcq.cqe_sz); in get_cqe()
87 cqe64 = (cq->mcq.cqe_sz == 64) ? cqe : cqe + 64; in get_sw_cqe()
99 return get_sw_cqe(cq, cq->mcq.cons_index); in next_cqe_sw()
425 cqe64 = (cq->mcq.cqe_sz == 64) ? cqe : cqe + 64; in mlx5_poll_one()
427 ++cq->mcq.cons_index; in mlx5_poll_one()
456 cq->mcq.cqn, qpn); in mlx5_poll_one()
490 "Requestor" : "Responder", cq->mcq.cqn); in mlx5_poll_one()
523 cq->mcq.cqn, be32_to_cpu(sig_err_cqe->mkey)); in mlx5_poll_one()
533 cq->mcq.cqn, mr->sig->err_item.key, in mlx5_poll_one()
563 mlx5_cq_set_ci(&cq->mcq); in mlx5_ib_poll_cq()
578 mlx5_cq_arm(&to_mcq(ibcq)->mcq, in mlx5_ib_arm_cq()
583 to_mcq(ibcq)->mcq.cons_index); in mlx5_ib_arm_cq()
702 cq->mcq.set_ci_db = cq->db.db; in create_cq_kernel()
703 cq->mcq.arm_db = cq->db.db + 1; in create_cq_kernel()
704 cq->mcq.cqe_sz = cqe_size; in create_cq_kernel()
794 err = mlx5_core_create_cq(dev->mdev, &cq->mcq, cqb, inlen); in mlx5_ib_create_cq()
798 mlx5_ib_dbg(dev, "cqn 0x%x\n", cq->mcq.cqn); in mlx5_ib_create_cq()
799 cq->mcq.irqn = irqn; in mlx5_ib_create_cq()
800 cq->mcq.comp = mlx5_ib_cq_comp; in mlx5_ib_create_cq()
801 cq->mcq.event = mlx5_ib_cq_event; in mlx5_ib_create_cq()
804 if (ib_copy_to_udata(udata, &cq->mcq.cqn, sizeof(__u32))) { in mlx5_ib_create_cq()
814 mlx5_core_destroy_cq(dev->mdev, &cq->mcq); in mlx5_ib_create_cq()
833 struct mlx5_ib_cq *mcq = to_mcq(cq); in mlx5_ib_destroy_cq() local
839 mlx5_core_destroy_cq(dev->mdev, &mcq->mcq); in mlx5_ib_destroy_cq()
841 destroy_cq_user(mcq, context); in mlx5_ib_destroy_cq()
843 destroy_cq_kernel(dev, mcq); in mlx5_ib_destroy_cq()
845 kfree(mcq); in mlx5_ib_destroy_cq()
872 for (prod_index = cq->mcq.cons_index; get_sw_cqe(cq, prod_index); prod_index++) in __mlx5_ib_cq_clean()
873 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe) in __mlx5_ib_cq_clean()
879 while ((int) --prod_index - (int) cq->mcq.cons_index >= 0) { in __mlx5_ib_cq_clean()
881 cqe64 = (cq->mcq.cqe_sz == 64) ? cqe : cqe + 64; in __mlx5_ib_cq_clean()
888 dest64 = (cq->mcq.cqe_sz == 64) ? dest : dest + 64; in __mlx5_ib_cq_clean()
890 memcpy(dest, cqe, cq->mcq.cqe_sz); in __mlx5_ib_cq_clean()
897 cq->mcq.cons_index += nfreed; in __mlx5_ib_cq_clean()
902 mlx5_cq_set_ci(&cq->mcq); in __mlx5_ib_cq_clean()
920 struct mlx5_ib_cq *mcq = to_mcq(cq); in mlx5_ib_modify_cq() local
931 in->cqn = cpu_to_be32(mcq->mcq.cqn); in mlx5_ib_modify_cq()
936 err = mlx5_core_modify_cq(dev->mdev, &mcq->mcq, in, sizeof(*in)); in mlx5_ib_modify_cq()
940 mlx5_ib_warn(dev, "modify cq 0x%x failed\n", mcq->mcq.cqn); in mlx5_ib_modify_cq()
1031 i = cq->mcq.cons_index; in copy_resize_cqes()
1059 cq->mcq.cqn); in copy_resize_cqes()
1063 ++cq->mcq.cons_index; in copy_resize_cqes()
1131 in->cqn = cpu_to_be32(cq->mcq.cqn); in mlx5_ib_resize_cq()
1133 err = mlx5_core_modify_cq(dev->mdev, &cq->mcq, in, inlen); in mlx5_ib_resize_cq()