Lines Matching refs:ibcq
45 struct ib_cq *ibcq = &to_mibcq(cq)->ibcq; in mlx4_ib_cq_comp() local
46 ibcq->comp_handler(ibcq, ibcq->cq_context); in mlx4_ib_cq_comp()
52 struct ib_cq *ibcq; in mlx4_ib_cq_event() local
60 ibcq = &to_mibcq(cq)->ibcq; in mlx4_ib_cq_event()
61 if (ibcq->event_handler) { in mlx4_ib_cq_event()
62 event.device = ibcq->device; in mlx4_ib_cq_event()
64 event.element.cq = ibcq; in mlx4_ib_cq_event()
65 ibcq->event_handler(&event, ibcq->cq_context); in mlx4_ib_cq_event()
81 struct mlx4_cqe *cqe = get_cqe(cq, n & cq->ibcq.cqe); in get_sw_cqe()
85 !!(n & (cq->ibcq.cqe + 1))) ? NULL : cqe; in get_sw_cqe()
174 int mlx4_ib_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr, in mlx4_ib_create_cq() argument
177 struct ib_device *ibdev = ibcq->device; in mlx4_ib_create_cq()
181 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_create_cq()
195 cq->ibcq.cqe = entries - 1; in mlx4_ib_create_cq()
281 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_create_cq()
362 cqe = get_cqe(cq, i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
368 memcpy(new_cqe, get_cqe(cq, i & cq->ibcq.cqe), cqe_size); in mlx4_ib_cq_resize_copy_cqes()
373 cqe = get_cqe(cq, ++i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
379 int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) in mlx4_ib_resize_cq() argument
381 struct mlx4_ib_dev *dev = to_mdev(ibcq->device); in mlx4_ib_resize_cq()
382 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_resize_cq()
394 if (entries == ibcq->cqe + 1) { in mlx4_ib_resize_cq()
404 if (ibcq->uobject) { in mlx4_ib_resize_cq()
428 if (ibcq->uobject) { in mlx4_ib_resize_cq()
430 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
445 tmp_cqe = cq->ibcq.cqe; in mlx4_ib_resize_cq()
447 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
462 if (!ibcq->uobject) in mlx4_ib_resize_cq()
695 struct mlx4_ib_dev *dev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_one()
697 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_poll_one()
699 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_poll_one()
715 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
727 msrq = mlx4_srq_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
837 if (mlx4_is_mfunc(to_mdev(cq->ibcq.device)->dev)) { in mlx4_ib_poll_one()
877 int mlx4_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc) in mlx4_ib_poll_cq() argument
879 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_poll_cq()
883 struct mlx4_ib_dev *mdev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_cq()
904 int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) in mlx4_ib_arm_cq() argument
906 mlx4_cq_arm(&to_mcq(ibcq)->mcq, in mlx4_ib_arm_cq()
909 to_mdev(ibcq->device)->uar_map, in mlx4_ib_arm_cq()
910 MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock)); in mlx4_ib_arm_cq()
931 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe) in __mlx4_ib_cq_clean()
939 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in __mlx4_ib_cq_clean()
947 dest = get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe); in __mlx4_ib_cq_clean()