Lines Matching defs:ibcq
54 if (head >= (unsigned)cq->ibcq.cqe) {
55 head = cq->ibcq.cqe;
68 if (cq->ibcq.event_handler) {
71 ev.device = cq->ibcq.device;
72 ev.element.cq = &cq->ibcq;
74 cq->ibcq.event_handler(&ev, cq->ibcq.cq_context);
140 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
150 * @ibcq: Allocated CQ
158 int rvt_create_cq(struct ib_cq *ibcq, const struct ib_cq_init_attr *attr,
161 struct ib_device *ibdev = ibcq->device;
163 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
237 * ib_create_cq() will initialize cq->ibcq except for cq->ibcq.cqe.
249 cq->ibcq.cqe = entries;
271 * @ibcq: the completion queue to destroy.
276 int rvt_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata)
278 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
294 * @ibcq: the completion queue
302 int rvt_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags)
304 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
334 * @ibcq: the completion queue
338 int rvt_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
340 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
393 if (head > (u32)cq->ibcq.cqe)
394 head = (u32)cq->ibcq.cqe;
395 if (tail > (u32)cq->ibcq.cqe)
396 tail = (u32)cq->ibcq.cqe;
398 n = cq->ibcq.cqe + 1 + head - tail;
410 if (tail == (u32)cq->ibcq.cqe)
415 cq->ibcq.cqe = cqe;
467 * @ibcq: the completion queue to poll
476 int rvt_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
478 struct rvt_cq *cq = ibcq_to_rvtcq(ibcq);
492 if (tail > (u32)cq->ibcq.cqe)
493 tail = (u32)cq->ibcq.cqe;
500 if (tail >= cq->ibcq.cqe)