Lines Matching defs:ibcq
181 return cqe_sw(get_cqe(cq, cq->cons_index & cq->ibcq.cqe));
230 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
254 event.element.cq = &cq->ibcq;
255 if (cq->ibcq.event_handler)
256 cq->ibcq.event_handler(&event, cq->ibcq.cq_context);
290 cqe_sw(get_cqe(cq, prod_index & cq->ibcq.cqe));
292 if (prod_index == cq->cons_index + cq->ibcq.cqe)
304 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe);
310 memcpy(get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe),
316 set_cqe_hw(get_cqe(cq, (cq->cons_index + i) & cq->ibcq.cqe));
335 if (!mthca_is_memfree(to_mdev(cq->ibcq.device)) &&
336 cq->ibcq.cqe < cq->resize_buf->cqe) {
337 cq->cons_index &= cq->ibcq.cqe;
338 if (cqe_sw(get_cqe(cq, cq->ibcq.cqe)))
339 cq->cons_index -= cq->ibcq.cqe + 1;
342 for (i = cq->cons_index; cqe_sw(get_cqe(cq, i & cq->ibcq.cqe)); ++i)
345 get_cqe(cq, i & cq->ibcq.cqe), MTHCA_CQ_ENTRY_SIZE);
654 int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
657 struct mthca_dev *dev = to_mdev(ibcq->device);
658 struct mthca_cq *cq = to_mcq(ibcq);
698 cq->cons_index &= cq->ibcq.cqe;
706 tcqe = cq->ibcq.cqe;
708 cq->ibcq.cqe = cq->resize_buf->cqe;
736 int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
738 struct mthca_cq *cq = to_mcq(ibcq);
762 to_mdev(ibcq->device)->kar + MTHCA_CQ_DOORBELL,
763 MTHCA_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->doorbell_lock));
776 cq->ibcq.cqe = nent - 1;
867 mthca_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);
941 mthca_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe);