Lines Matching defs:ibcq
96 if (head >= (unsigned)cq->ibcq.cqe) {
97 head = cq->ibcq.cqe;
110 if (cq->ibcq.event_handler) {
113 ev.device = cq->ibcq.device;
114 ev.element.cq = &cq->ibcq;
116 cq->ibcq.event_handler(&ev, cq->ibcq.cq_context);
182 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
192 * @ibcq: Allocated CQ
200 int rvt_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
203 struct ib_device *ibdev = ibcq->device;
205 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
279 * ib_create_cq() will initialize cq->ibcq except for cq->ibcq.cqe.
291 cq->ibcq.cqe = entries;
313 * @ibcq: the completion queue to destroy.
318 int rvt_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata)
320 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
336 * @ibcq: the completion queue
344 int rvt_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags)
346 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
376 * @ibcq: the completion queue
380 int rvt_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
382 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
435 if (head > (u32)cq->ibcq.cqe)
436 head = (u32)cq->ibcq.cqe;
437 if (tail > (u32)cq->ibcq.cqe)
438 tail = (u32)cq->ibcq.cqe;
440 n = cq->ibcq.cqe + 1 + head - tail;
452 if (tail == (u32)cq->ibcq.cqe)
457 cq->ibcq.cqe = cqe;
509 * @ibcq: the completion queue to poll
518 int rvt_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
520 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
534 if (tail > (u32)cq->ibcq.cqe)
535 tail = (u32)cq->ibcq.cqe;
542 if (tail >= cq->ibcq.cqe)