Lines Matching defs:mcq
48 static void mlx5_ib_cq_event(struct mlx5_core_cq *mcq, enum mlx5_event type)
50 struct mlx5_ib_cq *cq = container_of(mcq, struct mlx5_ib_cq, mcq);
57 type, mcq->cqn);
84 cqe64 = (cq->mcq.cqe_sz == 64) ? cqe : cqe + 64;
96 return get_sw_cqe(cq, cq->mcq.cons_index);
467 cqe64 = (cq->mcq.cqe_sz == 64) ? cqe : cqe + 64;
469 ++cq->mcq.cons_index;
526 "Requestor" : "Responder", cq->mcq.cqn);
567 cq->mcq.cqn, sig->err_item.key,
593 cq->mcq.cqn);
637 mlx5_cq_set_ci(&cq->mcq);
660 mlx5_cq_arm(&cq->mcq,
663 uar_page, to_mcq(ibcq)->mcq.cons_index);
891 cq->mcq.set_ci_db = cq->db.db;
892 cq->mcq.arm_db = cq->db.db + 1;
893 cq->mcq.cqe_sz = cqe_size;
1014 err = mlx5_core_create_cq(dev->mdev, &cq->mcq, cqb, inlen, out, sizeof(out));
1018 mlx5_ib_dbg(dev, "cqn 0x%x\n", cq->mcq.cqn);
1020 cq->mcq.tasklet_ctx.comp = mlx5_ib_cq_comp;
1022 cq->mcq.comp = mlx5_ib_cq_comp;
1023 cq->mcq.event = mlx5_ib_cq_event;
1028 if (ib_copy_to_udata(udata, &cq->mcq.cqn, sizeof(__u32))) {
1038 mlx5_core_destroy_cq(dev->mdev, &cq->mcq);
1052 struct mlx5_ib_cq *mcq = to_mcq(cq);
1055 ret = mlx5_core_destroy_cq(dev->mdev, &mcq->mcq);
1060 destroy_cq_user(mcq, udata);
1062 destroy_cq_kernel(dev, mcq);
1088 for (prod_index = cq->mcq.cons_index; get_sw_cqe(cq, prod_index); prod_index++)
1089 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe)
1095 while ((int) --prod_index - (int) cq->mcq.cons_index >= 0) {
1097 cqe64 = (cq->mcq.cqe_sz == 64) ? cqe : cqe + 64;
1104 dest64 = (cq->mcq.cqe_sz == 64) ? dest : dest + 64;
1106 memcpy(dest, cqe, cq->mcq.cqe_sz);
1113 cq->mcq.cons_index += nfreed;
1118 mlx5_cq_set_ci(&cq->mcq);
1135 struct mlx5_ib_cq *mcq = to_mcq(cq);
1144 err = mlx5_core_modify_cq_moderation(dev->mdev, &mcq->mcq,
1147 mlx5_ib_warn(dev, "modify cq 0x%x failed\n", mcq->mcq.cqn);
1227 i = cq->mcq.cons_index;
1254 cq->mcq.cqn);
1258 ++cq->mcq.cons_index;
1361 MLX5_SET(modify_cq_in, in, cqn, cq->mcq.cqn);
1363 err = mlx5_core_modify_cq(dev->mdev, &cq->mcq, in, inlen);