Lines Matching refs:cq

271 static int fill_cq(struct sk_buff *msg, struct t4_cq *cq)  in fill_cq()  argument
273 if (rdma_nl_put_driver_u32(msg, "cqid", cq->cqid)) in fill_cq()
275 if (rdma_nl_put_driver_u32(msg, "memsize", cq->memsize)) in fill_cq()
277 if (rdma_nl_put_driver_u32(msg, "size", cq->size)) in fill_cq()
279 if (rdma_nl_put_driver_u32(msg, "cidx", cq->cidx)) in fill_cq()
281 if (rdma_nl_put_driver_u32(msg, "cidx_inc", cq->cidx_inc)) in fill_cq()
283 if (rdma_nl_put_driver_u32(msg, "sw_cidx", cq->sw_cidx)) in fill_cq()
285 if (rdma_nl_put_driver_u32(msg, "sw_pidx", cq->sw_pidx)) in fill_cq()
287 if (rdma_nl_put_driver_u32(msg, "sw_in_use", cq->sw_in_use)) in fill_cq()
289 if (rdma_nl_put_driver_u32(msg, "vector", cq->vector)) in fill_cq()
291 if (rdma_nl_put_driver_u32(msg, "gen", cq->gen)) in fill_cq()
293 if (rdma_nl_put_driver_u32(msg, "error", cq->error)) in fill_cq()
296 be64_to_cpu(cq->bits_type_ts))) in fill_cq()
298 if (rdma_nl_put_driver_u64_hex(msg, "flags", cq->flags)) in fill_cq()
333 static int fill_hwcqes(struct sk_buff *msg, struct t4_cq *cq, in fill_hwcqes() argument
338 idx = (cq->cidx > 0) ? cq->cidx - 1 : cq->size - 1; in fill_hwcqes()
341 idx = cq->cidx; in fill_hwcqes()
350 static int fill_swcqes(struct sk_buff *msg, struct t4_cq *cq, in fill_swcqes() argument
355 if (!cq->sw_in_use) in fill_swcqes()
358 idx = cq->sw_cidx; in fill_swcqes()
361 if (cq->sw_in_use == 1) in fill_swcqes()
363 idx = (cq->sw_pidx > 0) ? cq->sw_pidx - 1 : cq->size - 1; in fill_swcqes()
378 struct t4_cq cq; in c4iw_fill_res_cq_entry() local
393 cq = chp->cq; in c4iw_fill_res_cq_entry()
396 idx = (cq.cidx > 0) ? cq.cidx - 1 : cq.size - 1; in c4iw_fill_res_cq_entry()
397 hwcqes[0] = chp->cq.queue[idx]; in c4iw_fill_res_cq_entry()
399 idx = cq.cidx; in c4iw_fill_res_cq_entry()
400 hwcqes[1] = chp->cq.queue[idx]; in c4iw_fill_res_cq_entry()
403 if (cq.sw_in_use) { in c4iw_fill_res_cq_entry()
404 swcqes[0] = chp->cq.sw_queue[cq.sw_cidx]; in c4iw_fill_res_cq_entry()
405 if (cq.sw_in_use > 1) { in c4iw_fill_res_cq_entry()
406 idx = (cq.sw_pidx > 0) ? cq.sw_pidx - 1 : cq.size - 1; in c4iw_fill_res_cq_entry()
407 swcqes[1] = chp->cq.sw_queue[idx]; in c4iw_fill_res_cq_entry()
413 if (fill_cq(msg, &cq)) in c4iw_fill_res_cq_entry()
416 if (fill_swcqes(msg, &cq, swcqes)) in c4iw_fill_res_cq_entry()
419 if (fill_hwcqes(msg, &cq, hwcqes)) in c4iw_fill_res_cq_entry()