Lines Matching defs:ibcq
181 return cqe_sw(get_cqe(cq, cq->cons_index & cq->ibcq.cqe));
235 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
259 event.element.cq = &cq->ibcq;
260 if (cq->ibcq.event_handler)
261 cq->ibcq.event_handler(&event, cq->ibcq.cq_context);
295 cqe_sw(get_cqe(cq, prod_index & cq->ibcq.cqe));
297 if (prod_index == cq->cons_index + cq->ibcq.cqe)
309 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe);
315 memcpy(get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe),
321 set_cqe_hw(get_cqe(cq, (cq->cons_index + i) & cq->ibcq.cqe));
340 if (!mthca_is_memfree(to_mdev(cq->ibcq.device)) &&
341 cq->ibcq.cqe < cq->resize_buf->cqe) {
342 cq->cons_index &= cq->ibcq.cqe;
343 if (cqe_sw(get_cqe(cq, cq->ibcq.cqe)))
344 cq->cons_index -= cq->ibcq.cqe + 1;
347 for (i = cq->cons_index; cqe_sw(get_cqe(cq, i & cq->ibcq.cqe)); ++i)
350 get_cqe(cq, i & cq->ibcq.cqe), MTHCA_CQ_ENTRY_SIZE);
661 int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
664 struct mthca_dev *dev = to_mdev(ibcq->device);
665 struct mthca_cq *cq = to_mcq(ibcq);
705 cq->cons_index &= cq->ibcq.cqe;
713 tcqe = cq->ibcq.cqe;
715 cq->ibcq.cqe = cq->resize_buf->cqe;
743 int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
745 struct mthca_cq *cq = to_mcq(ibcq);
769 to_mdev(ibcq->device)->kar + MTHCA_CQ_DOORBELL,
770 MTHCA_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->doorbell_lock));
784 cq->ibcq.cqe = nent - 1;
880 mthca_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);
957 mthca_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);