Lines Matching refs:ibcq

46 	struct ib_cq *ibcq = &to_mibcq(cq)->ibcq;  in mlx4_ib_cq_comp()  local
47 ibcq->comp_handler(ibcq, ibcq->cq_context); in mlx4_ib_cq_comp()
53 struct ib_cq *ibcq; in mlx4_ib_cq_event() local
61 ibcq = &to_mibcq(cq)->ibcq; in mlx4_ib_cq_event()
62 if (ibcq->event_handler) { in mlx4_ib_cq_event()
63 event.device = ibcq->device; in mlx4_ib_cq_event()
65 event.element.cq = ibcq; in mlx4_ib_cq_event()
66 ibcq->event_handler(&event, ibcq->cq_context); in mlx4_ib_cq_event()
82 struct mlx4_cqe *cqe = get_cqe(cq, n & cq->ibcq.cqe); in get_sw_cqe()
86 !!(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()
194 cq->ibcq.cqe = entries - 1; in mlx4_ib_create_cq()
270 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_create_cq()
351 cqe = get_cqe(cq, i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
357 memcpy(new_cqe, get_cqe(cq, i & cq->ibcq.cqe), cqe_size); in mlx4_ib_cq_resize_copy_cqes()
362 cqe = get_cqe(cq, ++i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
368 int mlx4_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata) in mlx4_ib_resize_cq() argument
370 struct mlx4_ib_dev *dev = to_mdev(ibcq->device); in mlx4_ib_resize_cq()
371 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_resize_cq()
383 if (entries == ibcq->cqe + 1) { in mlx4_ib_resize_cq()
393 if (ibcq->uobject) { in mlx4_ib_resize_cq()
417 if (ibcq->uobject) { in mlx4_ib_resize_cq()
419 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
434 tmp_cqe = cq->ibcq.cqe; in mlx4_ib_resize_cq()
436 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
451 if (!ibcq->uobject) in mlx4_ib_resize_cq()
688 struct mlx4_ib_dev *dev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_one()
690 mlx4_ib_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mlx4_ib_poll_one()
692 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_poll_one()
708 mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
720 msrq = mlx4_srq_lookup(to_mdev(cq->ibcq.device)->dev, in mlx4_ib_poll_one()
828 if (mlx4_is_mfunc(to_mdev(cq->ibcq.device)->dev)) { in mlx4_ib_poll_one()
867 int mlx4_ib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *wc) in mlx4_ib_poll_cq() argument
869 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_poll_cq()
873 struct mlx4_ib_dev *mdev = to_mdev(cq->ibcq.device); in mlx4_ib_poll_cq()
895 int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) in mlx4_ib_arm_cq() argument
897 struct mlx4_ib_cq *cq = to_mcq(ibcq); in mlx4_ib_arm_cq()
898 struct mlx4_ib_dev *mdev = to_mdev(cq->ibcq.device); in mlx4_ib_arm_cq()
929 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe) in __mlx4_ib_cq_clean()
937 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in __mlx4_ib_cq_clean()
945 dest = get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe); in __mlx4_ib_cq_clean()