Lines Matching defs:ibcq

45 	struct ib_cq *ibcq = &to_mibcq(cq)->ibcq;
46 ibcq->comp_handler(ibcq, ibcq->cq_context);
52 struct ib_cq *ibcq;
60 ibcq = &to_mibcq(cq)->ibcq;
61 if (ibcq->event_handler) {
62 event.device = ibcq->device;
64 event.element.cq = ibcq;
65 ibcq->event_handler(&event, ibcq->cq_context);
81 struct mlx4_cqe *cqe = get_cqe(cq, n & cq->ibcq.cqe);
85 !!(n & (cq->ibcq.cqe + 1))) ? NULL : cqe;
178 int mlx4_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
182 struct ib_device *ibdev = ibcq->device;
186 struct mlx4_ib_cq *cq = to_mcq(ibcq);
200 cq->ibcq.cqe = entries - 1;
286 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);
367 cqe = get_cqe(cq, i & cq->ibcq.cqe);
373 memcpy(new_cqe, get_cqe(cq, i & cq->ibcq.cqe), cqe_size);
378 cqe = get_cqe(cq, ++i & cq->ibcq.cqe);
384 int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
386 struct mlx4_ib_dev *dev = to_mdev(ibcq->device);
387 struct mlx4_ib_cq *cq = to_mcq(ibcq);
399 if (entries == ibcq->cqe + 1) {
409 if (ibcq->uobject) {
433 if (ibcq->uobject) {
435 cq->ibcq.cqe = cq->resize_buf->cqe;
450 tmp_cqe = cq->ibcq.cqe;
452 cq->ibcq.cqe = cq->resize_buf->cqe;
467 if (!ibcq->uobject)
700 struct mlx4_ib_dev *dev = to_mdev(cq->ibcq.device);
702 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);
704 cq->ibcq.cqe = cq->resize_buf->cqe;
720 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev,
732 msrq = mlx4_srq_lookup(to_mdev(cq->ibcq.device)->dev,
842 if (mlx4_is_mfunc(to_mdev(cq->ibcq.device)->dev)) {
882 int mlx4_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc)
884 struct mlx4_ib_cq *cq = to_mcq(ibcq);
888 struct mlx4_ib_dev *mdev = to_mdev(cq->ibcq.device);
909 int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
911 mlx4_cq_arm(&to_mcq(ibcq)->mcq,
914 to_mdev(ibcq->device)->uar_map,
915 MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock));
936 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe)
944 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe);
952 dest = get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe);