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()
186 cq->ibcq.cqe = entries - 1; in mlx4_ib_create_cq()
250 return &cq->ibcq; in mlx4_ib_create_cq()
262 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_create_cq()
346 cqe = get_cqe(cq, i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
352 memcpy(new_cqe, get_cqe(cq, i & cq->ibcq.cqe), cqe_size); in mlx4_ib_cq_resize_copy_cqes()
357 cqe = get_cqe(cq, ++i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
363 int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) in mlx4_ib_resize_cq() argument
365 struct mlx4_ib_dev *dev = to_mdev(ibcq->device); in mlx4_ib_resize_cq()
366 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_resize_cq()
378 if (entries == ibcq->cqe + 1) { in mlx4_ib_resize_cq()
388 if (ibcq->uobject) { in mlx4_ib_resize_cq()
412 if (ibcq->uobject) { in mlx4_ib_resize_cq()
414 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
429 tmp_cqe = cq->ibcq.cqe; in mlx4_ib_resize_cq()
431 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
446 if (!ibcq->uobject) in mlx4_ib_resize_cq()
692 struct mlx4_ib_dev *dev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_one()
694 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_poll_one()
696 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_poll_one()
712 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
730 msrq = mlx4_srq_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
846 if (mlx4_is_mfunc(to_mdev(cq->ibcq.device)->dev)) { in mlx4_ib_poll_one()
882 int mlx4_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc) in mlx4_ib_poll_cq() argument
884 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_poll_cq()
889 struct mlx4_ib_dev *mdev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_cq()
914 int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) in mlx4_ib_arm_cq() argument
916 mlx4_cq_arm(&to_mcq(ibcq)->mcq, in mlx4_ib_arm_cq()
919 to_mdev(ibcq->device)->uar_map, in mlx4_ib_arm_cq()
920 MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock)); in mlx4_ib_arm_cq()
941 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe) in __mlx4_ib_cq_clean()
949 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in __mlx4_ib_cq_clean()
957 dest = get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe); in __mlx4_ib_cq_clean()