Lines Matching refs:ibcq
44 struct ib_cq *ibcq = &to_mibcq(cq)->ibcq; in mlx4_ib_cq_comp() local
45 ibcq->comp_handler(ibcq, ibcq->cq_context); in mlx4_ib_cq_comp()
51 struct ib_cq *ibcq; in mlx4_ib_cq_event() local
59 ibcq = &to_mibcq(cq)->ibcq; in mlx4_ib_cq_event()
60 if (ibcq->event_handler) { in mlx4_ib_cq_event()
61 event.device = ibcq->device; in mlx4_ib_cq_event()
63 event.element.cq = ibcq; in mlx4_ib_cq_event()
64 ibcq->event_handler(&event, ibcq->cq_context); in mlx4_ib_cq_event()
80 struct mlx4_cqe *cqe = get_cqe(cq, n & cq->ibcq.cqe); in get_sw_cqe()
84 !!(n & (cq->ibcq.cqe + 1))) ? NULL : cqe; in get_sw_cqe()
193 cq->ibcq.cqe = entries - 1; in mlx4_ib_create_cq()
259 return &cq->ibcq; in mlx4_ib_create_cq()
271 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_create_cq()
355 cqe = get_cqe(cq, i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
361 memcpy(new_cqe, get_cqe(cq, i & cq->ibcq.cqe), cqe_size); in mlx4_ib_cq_resize_copy_cqes()
366 cqe = get_cqe(cq, ++i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
372 int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) in mlx4_ib_resize_cq() argument
374 struct mlx4_ib_dev *dev = to_mdev(ibcq->device); in mlx4_ib_resize_cq()
375 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_resize_cq()
387 if (entries == ibcq->cqe + 1) { in mlx4_ib_resize_cq()
397 if (ibcq->uobject) { in mlx4_ib_resize_cq()
421 if (ibcq->uobject) { in mlx4_ib_resize_cq()
423 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
438 tmp_cqe = cq->ibcq.cqe; in mlx4_ib_resize_cq()
440 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
455 if (!ibcq->uobject) in mlx4_ib_resize_cq()
701 struct mlx4_ib_dev *dev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_one()
703 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_poll_one()
705 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_poll_one()
721 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
739 msrq = mlx4_srq_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
855 if (mlx4_is_mfunc(to_mdev(cq->ibcq.device)->dev)) { in mlx4_ib_poll_one()
891 int mlx4_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc) in mlx4_ib_poll_cq() argument
893 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_poll_cq()
898 struct mlx4_ib_dev *mdev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_cq()
923 int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) in mlx4_ib_arm_cq() argument
925 mlx4_cq_arm(&to_mcq(ibcq)->mcq, in mlx4_ib_arm_cq()
928 to_mdev(ibcq->device)->uar_map, in mlx4_ib_arm_cq()
929 MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock)); in mlx4_ib_arm_cq()
950 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe) in __mlx4_ib_cq_clean()
958 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in __mlx4_ib_cq_clean()
966 dest = get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe); in __mlx4_ib_cq_clean()