Home
last modified time | relevance | path

Searched refs:cq (Results 1 – 25 of 360) sorted by relevance

12345678910>>...15

/openbmc/linux/drivers/net/ethernet/mellanox/mlx4/
H A Den_cq.c55 cq = kzalloc_node(sizeof(*cq), GFP_KERNEL, node); in mlx4_en_create_cq()
56 if (!cq) { in mlx4_en_create_cq()
62 cq->buf_size = cq->size * mdev->dev->caps.cqe_size; in mlx4_en_create_cq()
79 *pcq = cq; in mlx4_en_create_cq()
84 kfree(cq); in mlx4_en_create_cq()
98 cq->mcq.set_ci_db = cq->wqres.db.db; in mlx4_en_activate_cq()
99 cq->mcq.arm_db = cq->wqres.db.db + 1; in mlx4_en_activate_cq()
102 memset(cq->buf, 0, cq->buf_size); in mlx4_en_activate_cq()
132 cq->size = priv->rx_ring[cq->ring]->actual_size; in mlx4_en_activate_cq()
140 &mdev->priv_uar, cq->wqres.db.dma, &cq->mcq, in mlx4_en_activate_cq()
[all …]
H A Dcq.c106 struct mlx4_cq *cq; in mlx4_cq_completion() local
113 if (!cq) { in mlx4_cq_completion()
121 ++cq->arm_sn; in mlx4_cq_completion()
123 cq->comp(cq); in mlx4_cq_completion()
129 struct mlx4_cq *cq; in mlx4_cq_event() local
135 if (!cq) { in mlx4_cq_event()
143 cq->event(cq, event_type); in mlx4_cq_event()
360 err = mlx4_cq_alloc_icm(dev, &cq->cqn, cq->usage); in mlx4_cq_alloc()
365 err = radix_tree_insert(&cq_table->tree, cq->cqn, cq); in mlx4_cq_alloc()
410 cq->cons_index = 0; in mlx4_cq_alloc()
[all …]
/openbmc/linux/drivers/infiniband/core/
H A Dcq.c50 cq->device->ops.modify_cq(cq, comps, usec); in ib_cq_rdma_dim_work()
187 queue_work(cq->comp_wq, &cq->work); in ib_cq_poll_work()
195 queue_work(cq->comp_wq, &cq->work); in ib_cq_completion_workqueue()
224 if (!cq) in __ib_alloc_cq()
261 cq->comp_wq = (cq->poll_ctx == IB_POLL_WORKQUEUE) ? in __ib_alloc_cq()
271 return cq; in __ib_alloc_cq()
275 cq->device->ops.destroy_cq(cq, NULL); in __ib_alloc_cq()
280 kfree(cq); in __ib_alloc_cq()
343 ret = cq->device->ops.destroy_cq(cq, NULL); in ib_free_cq()
347 kfree(cq); in ib_free_cq()
[all …]
/openbmc/linux/drivers/net/ethernet/intel/ice/
H A Dice_controlq.c77 if (cq->sq.len && cq->sq.len_mask && cq->sq.len_ena_mask) in ice_check_sq_alive()
78 return (rd32(hw, cq->sq.len) & (cq->sq.len_mask | in ice_check_sq_alive()
80 (cq->num_sq_entries | cq->sq.len_ena_mask); in ice_check_sq_alive()
106 cq->sq.desc_buf.va, cq->sq.desc_buf.pa); in ice_alloc_ctrlq_sq_ring()
372 if (!cq->num_sq_entries || !cq->sq_buf_size) { in ice_init_sq()
396 cq->sq.count = cq->num_sq_entries; in ice_init_sq()
432 if (!cq->num_rq_entries || !cq->rq_buf_size) { in ice_init_rq()
456 cq->rq.count = cq->num_rq_entries; in ice_init_rq()
635 !cq->rq_buf_size || !cq->sq_buf_size) { in ice_init_ctrlq()
1055 if (cq->sq.next_to_use == cq->sq.count) in ice_sq_send_cmd()
[all …]
/openbmc/linux/drivers/infiniband/sw/rxe/
H A Drxe_cq.c27 if (cq) { in rxe_cq_chk_attr()
52 if (!cq->queue) { in rxe_cq_from_init()
58 cq->queue->buf, cq->queue->buf_size, &cq->queue->ip); in rxe_cq_from_init()
61 kfree(cq->queue); in rxe_cq_from_init()
68 cq->ibcq.cqe = cqe; in rxe_cq_from_init()
103 ev.element.cq = &cq->ibcq; in rxe_cq_post()
105 cq->ibcq.event_handler(&ev, cq->ibcq.cq_context); in rxe_cq_post()
118 cq->notify = 0; in rxe_cq_post()
119 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in rxe_cq_post()
129 struct rxe_cq *cq = container_of(elem, typeof(*cq), elem); in rxe_cq_cleanup() local
[all …]
/openbmc/linux/drivers/infiniband/hw/mthca/
H A Dmthca_cq.c181 return cqe_sw(get_cqe(cq, cq->cons_index & cq->ibcq.cqe)); in next_cqe_sw()
230 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in mthca_cq_completion()
254 event.element.cq = &cq->ibcq; in mthca_cq_event()
316 set_cqe_hw(get_cqe(cq, (cq->cons_index + i) & cq->ibcq.cqe)); in mthca_cq_clean()
337 cq->cons_index &= cq->ibcq.cqe; in mthca_cq_resize_copy_cqes()
339 cq->cons_index -= cq->ibcq.cqe + 1; in mthca_cq_resize_copy_cqes()
342 for (i = cq->cons_index; cqe_sw(get_cqe(cq, i & cq->ibcq.cqe)); ++i) in mthca_cq_resize_copy_cqes()
384 cq->cqn, cq->cons_index); in handle_error_cqe()
698 cq->cons_index &= cq->ibcq.cqe; in mthca_poll_cq()
799 cq->cqn, &cq->arm_db); in mthca_init_cq()
[all …]
/openbmc/linux/drivers/net/ethernet/cisco/enic/
H A Dvnic_cq.c16 void vnic_cq_free(struct vnic_cq *cq) in vnic_cq_free() argument
18 vnic_dev_free_desc_ring(cq->vdev, &cq->ring); in vnic_cq_free()
20 cq->ctrl = NULL; in vnic_cq_free()
26 cq->index = index; in vnic_cq_alloc()
27 cq->vdev = vdev; in vnic_cq_alloc()
30 if (!cq->ctrl) { in vnic_cq_alloc()
48 iowrite32(cq->ring.desc_count, &cq->ctrl->ring_size); in vnic_cq_init()
65 cq->to_clean = 0; in vnic_cq_clean()
66 cq->last_color = 0; in vnic_cq_clean()
68 iowrite32(0, &cq->ctrl->cq_head); in vnic_cq_clean()
[all …]
H A Dvnic_cq.h70 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs + in vnic_cq_service()
71 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
75 while (color != cq->last_color) { in vnic_cq_service()
77 if ((*q_service)(cq->vdev, cq_desc, type, in vnic_cq_service()
81 cq->to_clean++; in vnic_cq_service()
82 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_service()
83 cq->to_clean = 0; in vnic_cq_service()
84 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_service()
88 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
100 void vnic_cq_free(struct vnic_cq *cq);
[all …]
/openbmc/linux/drivers/scsi/snic/
H A Dvnic_cq.c10 void svnic_cq_free(struct vnic_cq *cq) in svnic_cq_free() argument
12 svnic_dev_free_desc_ring(cq->vdev, &cq->ring); in svnic_cq_free()
14 cq->ctrl = NULL; in svnic_cq_free()
20 cq->index = index; in svnic_cq_alloc()
21 cq->vdev = vdev; in svnic_cq_alloc()
24 if (!cq->ctrl) { in svnic_cq_alloc()
43 iowrite32(cq->ring.desc_count, &cq->ctrl->ring_size); in svnic_cq_init()
58 cq->to_clean = 0; in svnic_cq_clean()
59 cq->last_color = 0; in svnic_cq_clean()
61 iowrite32(0, &cq->ctrl->cq_head); in svnic_cq_clean()
[all …]
H A Dvnic_cq_fw.h10 vnic_cq_fw_service(struct vnic_cq *cq, in vnic_cq_fw_service() argument
21 desc = (struct snic_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_fw_service()
22 cq->ring.desc_size * cq->to_clean); in vnic_cq_fw_service()
25 while (color != cq->last_color) { in vnic_cq_fw_service()
27 if ((*q_service)(cq->vdev, cq->index, desc)) in vnic_cq_fw_service()
30 cq->to_clean++; in vnic_cq_fw_service()
31 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_fw_service()
32 cq->to_clean = 0; in vnic_cq_fw_service()
33 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_fw_service()
36 desc = (struct snic_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_fw_service()
[all …]
H A Dvnic_cq.h57 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs + in svnic_cq_service()
58 cq->ring.desc_size * cq->to_clean); in svnic_cq_service()
62 while (color != cq->last_color) { in svnic_cq_service()
64 if ((*q_service)(cq->vdev, cq_desc, type, in svnic_cq_service()
68 cq->to_clean++; in svnic_cq_service()
69 if (cq->to_clean == cq->ring.desc_count) { in svnic_cq_service()
70 cq->to_clean = 0; in svnic_cq_service()
71 cq->last_color = cq->last_color ? 0 : 1; in svnic_cq_service()
75 cq->ring.desc_size * cq->to_clean); in svnic_cq_service()
87 void svnic_cq_free(struct vnic_cq *cq);
[all …]
/openbmc/linux/drivers/scsi/fnic/
H A Dvnic_cq.c12 void vnic_cq_free(struct vnic_cq *cq) in vnic_cq_free() argument
14 vnic_dev_free_desc_ring(cq->vdev, &cq->ring); in vnic_cq_free()
16 cq->ctrl = NULL; in vnic_cq_free()
24 cq->index = index; in vnic_cq_alloc()
25 cq->vdev = vdev; in vnic_cq_alloc()
28 if (!cq->ctrl) { in vnic_cq_alloc()
50 iowrite32(cq->ring.desc_count, &cq->ctrl->ring_size); in vnic_cq_init()
65 cq->to_clean = 0; in vnic_cq_clean()
66 cq->last_color = 0; in vnic_cq_clean()
68 iowrite32(0, &cq->ctrl->cq_head); in vnic_cq_clean()
[all …]
H A Dvnic_cq_copy.h12 struct vnic_cq *cq, in vnic_cq_copy_service() argument
23 desc = (struct fcpio_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_copy_service()
24 cq->ring.desc_size * cq->to_clean); in vnic_cq_copy_service()
27 while (color != cq->last_color) { in vnic_cq_copy_service()
29 if ((*q_service)(cq->vdev, cq->index, desc)) in vnic_cq_copy_service()
32 cq->to_clean++; in vnic_cq_copy_service()
33 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_copy_service()
34 cq->to_clean = 0; in vnic_cq_copy_service()
35 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_copy_service()
38 desc = (struct fcpio_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_copy_service()
[all …]
H A Dvnic_cq.h69 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs + in vnic_cq_service()
70 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
74 while (color != cq->last_color) { in vnic_cq_service()
76 if ((*q_service)(cq->vdev, cq_desc, type, in vnic_cq_service()
80 cq->to_clean++; in vnic_cq_service()
81 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_service()
82 cq->to_clean = 0; in vnic_cq_service()
83 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_service()
87 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
99 void vnic_cq_free(struct vnic_cq *cq);
[all …]
/openbmc/linux/drivers/infiniband/hw/mlx4/
H A Dcq.c90 return get_sw_cqe(cq, cq->mcq.cons_index); in next_cqe_sw()
229 cq->mcq.set_ci_db = cq->db.db; in mlx4_ib_create_cq()
230 cq->mcq.arm_db = cq->db.db + 1; in mlx4_ib_create_cq()
362 cqe = get_cqe(cq, i & cq->ibcq.cqe); in mlx4_ib_cq_resize_copy_cqes()
429 cq->buf = cq->resize_buf->buf; in mlx4_ib_resize_cq()
430 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
432 cq->umem = cq->resize_umem; in mlx4_ib_resize_cq()
446 cq->buf = cq->resize_buf->buf; in mlx4_ib_resize_cq()
447 cq->ibcq.cqe = cq->resize_buf->cqe; in mlx4_ib_resize_cq()
698 cq->buf = cq->resize_buf->buf; in mlx4_ib_poll_one()
[all …]
/openbmc/linux/drivers/infiniband/sw/rdmavt/
H A Dcq.c38 if (cq->ip) { in rvt_cq_enter()
39 u_wc = cq->queue; in rvt_cq_enter()
72 ev.element.cq = &cq->ibcq; in rvt_cq_enter()
74 cq->ibcq.event_handler(&ev, cq->ibcq.cq_context); in rvt_cq_enter()
140 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in send_complete()
230 if (cq->ip) { in rvt_create_cq()
241 cq->rdi = rdi; in rvt_create_cq()
285 if (cq->ip) in rvt_destroy_cq()
322 if (cq->kqueue->head != cq->kqueue->tail) in rvt_req_notify_cq()
432 if (cq->ip) { in rvt_resize_cq()
[all …]
/openbmc/linux/drivers/infiniband/hw/vmw_pvrdma/
H A Dpvrdma_cq.c135 if (!cq->is_kernel) { in pvrdma_create_cq()
165 ret = pvrdma_page_dir_init(dev, &cq->pdir, npages, cq->is_kernel); in pvrdma_create_cq()
173 if (cq->is_kernel) in pvrdma_create_cq()
174 cq->ring_state = cq->pdir.pages[0]; in pvrdma_create_cq()
176 pvrdma_page_dir_insert_umem(&cq->pdir, cq->umem, 0); in pvrdma_create_cq()
199 dev->cq_tbl[cq->cq_handle % dev->dsr->caps.max_cq] = cq; in pvrdma_create_cq()
273 &cq->pdir, in get_cqe()
274 cq->offset + in get_cqe()
283 if (!cq->is_kernel) in _pvrdma_flush_cqe()
315 cq->ibcq.cqe); in _pvrdma_flush_cqe()
[all …]
/openbmc/linux/drivers/infiniband/hw/mlx5/
H A Dcq.c81 void *cqe = get_cqe(cq, n & cq->ibcq.cqe); in get_sw_cqe()
96 return get_sw_cqe(cq, cq->mcq.cons_index); in next_cqe_sw()
480 cq->buf = *cq->resize_buf; in mlx5_poll_one()
891 cq->mcq.set_ci_db = cq->db.db; in create_cq_kernel()
892 cq->mcq.arm_db = cq->db.db + 1; in create_cq_kernel()
941 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in notify_soft_wc_handler()
1079 if (!cq) in __mlx5_ib_cq_clean()
1096 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in __mlx5_ib_cq_clean()
1124 if (!cq) in mlx5_ib_cq_clean()
1370 cq->buf.umem = cq->resize_umem; in mlx5_ib_resize_cq()
[all …]
/openbmc/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Dcq.c82 mlx5_cq_hold(cq); in mlx5_add_cq_to_tasklet()
109 cq->cons_index = 0; in mlx5_create_cq()
110 cq->arm_sn = 0; in mlx5_create_cq()
111 cq->eq = eq; in mlx5_create_cq()
115 if (!cq->comp) in mlx5_create_cq()
131 cq->pid = current->pid; in mlx5_create_cq()
135 cq->cqn); in mlx5_create_cq()
137 cq->uar = dev->priv.uar; in mlx5_create_cq()
138 cq->irqn = eq->core.irqn; in mlx5_create_cq()
171 mlx5_eq_del_cq(&cq->eq->core, cq); in mlx5_core_destroy_cq()
[all …]
/openbmc/linux/drivers/infiniband/hw/cxgb4/
H A Dcq.c65 cq->memsize, cq->queue, in destroy_cq()
108 ((u8 *)cq->queue + (cq->size - 1) * in create_cq()
112 ((u8 *)cq->queue + (cq->size - 1) * in create_cq()
189 wq, cq, cq->sw_cidx, cq->sw_pidx); in insert_recv_cqe()
199 cq->sw_queue[cq->sw_pidx] = cqe; in insert_recv_cqe()
223 wq, cq, cq->sw_cidx, cq->sw_pidx); in insert_sq_cqe()
232 cq->sw_queue[cq->sw_pidx] = cqe; in insert_sq_cqe()
243 struct t4_cq *cq = &chp->cq; in c4iw_flush_sq() local
744 cq, cq->cqid, cq->sw_cidx); in poll_cq()
748 cq, cq->cqid, cq->cidx); in poll_cq()
[all …]
H A Dt4.h709 writel(val | INGRESSQID_V(cq->cqid), cq->gts); in write_gts()
736 if (cq->sw_in_use == cq->size) { in t4_swcq_produce()
743 if (++cq->sw_pidx == cq->size) in t4_swcq_produce()
750 if (++cq->sw_cidx == cq->size) in t4_swcq_consume()
756 cq->bits_type_ts = cq->queue[cq->cidx].bits_type_ts; in t4_hwcq_consume()
757 if (++cq->cidx_inc == (cq->size >> 4) || cq->cidx_inc == CIDXINC_M) { in t4_hwcq_consume()
764 if (++cq->cidx == cq->size) { in t4_hwcq_consume()
777 return cq->sw_in_use || t4_valid_cqe(cq, &cq->queue[cq->cidx]); in t4_cq_notempty()
794 } else if (t4_valid_cqe(cq, &cq->queue[cq->cidx])) { in t4_next_hw_cqe()
798 *cqe = &cq->queue[cq->cidx]; in t4_next_hw_cqe()
[all …]
H A Drestrack.c338 idx = (cq->cidx > 0) ? cq->cidx - 1 : cq->size - 1; in fill_hwcqes()
341 idx = cq->cidx; in fill_hwcqes()
355 if (!cq->sw_in_use) in fill_swcqes()
358 idx = cq->sw_cidx; 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()
399 idx = cq.cidx; in c4iw_fill_res_cq_entry()
404 swcqes[0] = chp->cq.sw_queue[cq.sw_cidx]; in c4iw_fill_res_cq_entry()
[all …]
/openbmc/linux/include/linux/mlx5/
H A Dcq.h141 static inline void mlx5_cq_set_ci(struct mlx5_core_cq *cq) in mlx5_cq_set_ci() argument
143 *cq->set_ci_db = cpu_to_be32(cq->cons_index & 0xffffff); in mlx5_cq_set_ci()
159 sn = cq->arm_sn & 3; in mlx5_cq_arm()
162 *cq->arm_db = cpu_to_be32(sn << 28 | cmd | ci); in mlx5_cq_arm()
170 doorbell[1] = cpu_to_be32(cq->cqn); in mlx5_cq_arm()
175 static inline void mlx5_cq_hold(struct mlx5_core_cq *cq) in mlx5_cq_hold() argument
177 refcount_inc(&cq->refcount); in mlx5_cq_hold()
180 static inline void mlx5_cq_put(struct mlx5_core_cq *cq) in mlx5_cq_put() argument
182 if (refcount_dec_and_test(&cq->refcount)) in mlx5_cq_put()
183 complete(&cq->free); in mlx5_cq_put()
[all …]
/openbmc/linux/drivers/scsi/elx/efct/
H A Defct_hw_queues.c46 if (!cq) { in efct_hw_init_queues()
60 if (!cq) { in efct_hw_init_queues()
164 if (!cq) in efct_hw_new_cq()
171 cq->queue = &hw->cq[cq->instance]; in efct_hw_new_cq()
183 hw->hw_cq[cq->instance] = cq; in efct_hw_new_cq()
187 cq->queue->id, cq->entry_count); in efct_hw_new_cq()
207 cq = kzalloc(sizeof(*cq), GFP_KERNEL); in efct_hw_new_cq_set()
216 cq->queue = &hw->cq[cq->instance]; in efct_hw_new_cq_set()
252 mq->cq = cq; in efct_hw_new_mq()
284 wq->cq = cq; in efct_hw_new_wq()
[all …]
/openbmc/linux/drivers/infiniband/hw/erdma/
H A Derdma_cq.c11 __be32 *cqe = get_queue_entry(cq->kern_cq.qbuf, cq->kern_cq.ci, in get_next_valid_cqe()
12 cq->depth, CQE_SHIFT); in get_next_valid_cqe()
16 return owner ^ !!(cq->kern_cq.ci & cq->depth) ? cqe : NULL; in get_next_valid_cqe()
23 FIELD_PREP(ERDMA_CQDB_CQN_MASK, cq->cqn) | in notify_cq()
29 *cq->kern_cq.db_record = db_data; in notify_cq()
30 writeq(db_data, cq->kern_cq.db); in notify_cq()
35 struct erdma_cq *cq = to_ecq(ibcq); in erdma_req_notify_cq() local
46 cq->kern_cq.notify_cnt++; in erdma_req_notify_cq()
122 cqe = get_next_valid_cqe(cq); in erdma_poll_one_cqe()
126 cq->kern_cq.ci++; in erdma_poll_one_cqe()
[all …]

12345678910>>...15