Home
last modified time | relevance | path

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

12345678910>>...13

/linux/drivers/infiniband/core/
A Dcq.c51 cq->device->ops.modify_cq(cq, comps, usec); in ib_cq_rdma_dim_work()
188 queue_work(cq->comp_wq, &cq->work); in ib_cq_poll_work()
196 queue_work(cq->comp_wq, &cq->work); in ib_cq_completion_workqueue()
225 if (!cq) in __ib_alloc_cq()
262 cq->comp_wq = (cq->poll_ctx == IB_POLL_WORKQUEUE) ? in __ib_alloc_cq()
272 return cq; in __ib_alloc_cq()
276 cq->device->ops.destroy_cq(cq, NULL); in __ib_alloc_cq()
281 kfree(cq); in __ib_alloc_cq()
344 ret = cq->device->ops.destroy_cq(cq, NULL); in ib_free_cq()
348 kfree(cq); in ib_free_cq()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx4/
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 …]
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 …]
/linux/drivers/net/ethernet/intel/ice/
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()
375 if (!cq->num_sq_entries || !cq->sq_buf_size) { in ice_init_sq()
399 cq->sq.count = cq->num_sq_entries; in ice_init_sq()
435 if (!cq->num_rq_entries || !cq->rq_buf_size) { in ice_init_rq()
459 cq->rq.count = cq->num_rq_entries; in ice_init_rq()
640 !cq->rq_buf_size || !cq->sq_buf_size) { in ice_init_ctrlq()
1063 if (cq->sq.next_to_use == cq->sq.count) in ice_sq_send_cmd()
[all …]
/linux/drivers/infiniband/sw/rxe/
A Drxe_cq.c27 if (cq) { in rxe_cq_chk_attr()
44 struct rxe_cq *cq = from_tasklet(cq, t, comp_task); in rxe_send_complete() local
48 if (cq->is_dying) { in rxe_send_complete()
54 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in rxe_send_complete()
67 if (!cq->queue) { in rxe_cq_from_init()
73 cq->queue->buf, cq->queue->buf_size, &cq->queue->ip); in rxe_cq_from_init()
120 ev.element.cq = &cq->ibcq; in rxe_cq_post()
122 cq->ibcq.event_handler(&ev, cq->ibcq.cq_context); in rxe_cq_post()
137 cq->notify = 0; in rxe_cq_post()
155 struct rxe_cq *cq = container_of(arg, typeof(*cq), pelem); in rxe_cq_cleanup() local
[all …]
/linux/drivers/infiniband/hw/mthca/
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 …]
/linux/drivers/infiniband/hw/mlx4/
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 …]
/linux/drivers/infiniband/sw/rdmavt/
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 …]
/linux/drivers/infiniband/hw/vmw_pvrdma/
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 …]
/linux/drivers/net/ethernet/cisco/enic/
A Dvnic_cq.c29 void vnic_cq_free(struct vnic_cq *cq) in vnic_cq_free() argument
31 vnic_dev_free_desc_ring(cq->vdev, &cq->ring); in vnic_cq_free()
33 cq->ctrl = NULL; in vnic_cq_free()
39 cq->index = index; in vnic_cq_alloc()
40 cq->vdev = vdev; in vnic_cq_alloc()
43 if (!cq->ctrl) { in vnic_cq_alloc()
61 iowrite32(cq->ring.desc_count, &cq->ctrl->ring_size); in vnic_cq_init()
78 cq->to_clean = 0; in vnic_cq_clean()
79 cq->last_color = 0; in vnic_cq_clean()
81 iowrite32(0, &cq->ctrl->cq_head); in vnic_cq_clean()
[all …]
A Dvnic_cq.h83 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs + in vnic_cq_service()
84 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
88 while (color != cq->last_color) { in vnic_cq_service()
90 if ((*q_service)(cq->vdev, cq_desc, type, in vnic_cq_service()
94 cq->to_clean++; in vnic_cq_service()
95 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_service()
96 cq->to_clean = 0; in vnic_cq_service()
97 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_service()
101 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
113 void vnic_cq_free(struct vnic_cq *cq);
[all …]
/linux/drivers/scsi/snic/
A Dvnic_cq.c24 void svnic_cq_free(struct vnic_cq *cq) in svnic_cq_free() argument
26 svnic_dev_free_desc_ring(cq->vdev, &cq->ring); in svnic_cq_free()
28 cq->ctrl = NULL; in svnic_cq_free()
34 cq->index = index; in svnic_cq_alloc()
35 cq->vdev = vdev; in svnic_cq_alloc()
38 if (!cq->ctrl) { in svnic_cq_alloc()
57 iowrite32(cq->ring.desc_count, &cq->ctrl->ring_size); in svnic_cq_init()
72 cq->to_clean = 0; in svnic_cq_clean()
73 cq->last_color = 0; in svnic_cq_clean()
75 iowrite32(0, &cq->ctrl->cq_head); in svnic_cq_clean()
[all …]
A Dvnic_cq_fw.h24 vnic_cq_fw_service(struct vnic_cq *cq, in vnic_cq_fw_service() argument
35 desc = (struct snic_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_fw_service()
36 cq->ring.desc_size * cq->to_clean); in vnic_cq_fw_service()
39 while (color != cq->last_color) { in vnic_cq_fw_service()
41 if ((*q_service)(cq->vdev, cq->index, desc)) in vnic_cq_fw_service()
44 cq->to_clean++; in vnic_cq_fw_service()
45 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_fw_service()
46 cq->to_clean = 0; in vnic_cq_fw_service()
47 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_fw_service()
50 desc = (struct snic_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_fw_service()
[all …]
A Dvnic_cq.h71 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs + in svnic_cq_service()
72 cq->ring.desc_size * cq->to_clean); in svnic_cq_service()
76 while (color != cq->last_color) { in svnic_cq_service()
78 if ((*q_service)(cq->vdev, cq_desc, type, in svnic_cq_service()
82 cq->to_clean++; in svnic_cq_service()
83 if (cq->to_clean == cq->ring.desc_count) { in svnic_cq_service()
84 cq->to_clean = 0; in svnic_cq_service()
85 cq->last_color = cq->last_color ? 0 : 1; in svnic_cq_service()
89 cq->ring.desc_size * cq->to_clean); in svnic_cq_service()
101 void svnic_cq_free(struct vnic_cq *cq);
[all …]
/linux/drivers/scsi/fnic/
A Dvnic_cq.c24 void vnic_cq_free(struct vnic_cq *cq) in vnic_cq_free() argument
26 vnic_dev_free_desc_ring(cq->vdev, &cq->ring); in vnic_cq_free()
28 cq->ctrl = NULL; in vnic_cq_free()
36 cq->index = index; in vnic_cq_alloc()
37 cq->vdev = vdev; in vnic_cq_alloc()
40 if (!cq->ctrl) { in vnic_cq_alloc()
62 iowrite32(cq->ring.desc_count, &cq->ctrl->ring_size); in vnic_cq_init()
77 cq->to_clean = 0; in vnic_cq_clean()
78 cq->last_color = 0; in vnic_cq_clean()
80 iowrite32(0, &cq->ctrl->cq_head); in vnic_cq_clean()
[all …]
A Dvnic_cq_copy.h24 struct vnic_cq *cq, in vnic_cq_copy_service() argument
35 desc = (struct fcpio_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_copy_service()
36 cq->ring.desc_size * cq->to_clean); in vnic_cq_copy_service()
39 while (color != cq->last_color) { in vnic_cq_copy_service()
41 if ((*q_service)(cq->vdev, cq->index, desc)) in vnic_cq_copy_service()
44 cq->to_clean++; in vnic_cq_copy_service()
45 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_copy_service()
46 cq->to_clean = 0; in vnic_cq_copy_service()
47 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_copy_service()
50 desc = (struct fcpio_fw_req *)((u8 *)cq->ring.descs + in vnic_cq_copy_service()
[all …]
A Dvnic_cq.h81 cq_desc = (struct cq_desc *)((u8 *)cq->ring.descs + in vnic_cq_service()
82 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
86 while (color != cq->last_color) { in vnic_cq_service()
88 if ((*q_service)(cq->vdev, cq_desc, type, in vnic_cq_service()
92 cq->to_clean++; in vnic_cq_service()
93 if (cq->to_clean == cq->ring.desc_count) { in vnic_cq_service()
94 cq->to_clean = 0; in vnic_cq_service()
95 cq->last_color = cq->last_color ? 0 : 1; in vnic_cq_service()
99 cq->ring.desc_size * cq->to_clean); in vnic_cq_service()
111 void vnic_cq_free(struct vnic_cq *cq);
[all …]
/linux/drivers/infiniband/hw/mlx5/
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()
474 cq->buf = *cq->resize_buf; in mlx5_poll_one()
881 cq->mcq.set_ci_db = cq->db.db; in create_cq_kernel()
882 cq->mcq.arm_db = cq->db.db + 1; in create_cq_kernel()
931 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in notify_soft_wc_handler()
1069 if (!cq) in __mlx5_ib_cq_clean()
1086 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in __mlx5_ib_cq_clean()
1114 if (!cq) in mlx5_ib_cq_clean()
1360 cq->buf.umem = cq->resize_umem; in mlx5_ib_resize_cq()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/
A Dcq.c83 mlx5_cq_hold(cq); in mlx5_add_cq_to_tasklet()
109 cq->cons_index = 0; in mlx5_core_create_cq()
110 cq->arm_sn = 0; in mlx5_core_create_cq()
111 cq->eq = eq; in mlx5_core_create_cq()
115 if (!cq->comp) in mlx5_core_create_cq()
131 cq->pid = current->pid; in mlx5_core_create_cq()
135 cq->cqn); in mlx5_core_create_cq()
137 cq->uar = dev->priv.uar; in mlx5_core_create_cq()
138 cq->irqn = eq->core.irqn; in mlx5_core_create_cq()
161 mlx5_eq_del_cq(&cq->eq->core, cq); in mlx5_core_destroy_cq()
[all …]
/linux/drivers/infiniband/hw/cxgb4/
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 …]
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 …]
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 …]
/linux/drivers/scsi/elx/efct/
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 …]
/linux/include/linux/mlx5/
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 …]
/linux/drivers/net/ethernet/marvell/octeontx2/nic/
A Dotx2_txrx.c43 if (cq->cq_tail < cq->cq_head) in otx2_nix_cq_op_status()
44 cq->pend_cqe = (cq->cqe_cnt - cq->cq_head) + in otx2_nix_cq_op_status()
45 cq->cq_tail; in otx2_nix_cq_op_status()
47 cq->pend_cqe = cq->cq_tail - cq->cq_head; in otx2_nix_cq_op_status()
56 cqe_hdr = (struct nix_cqe_hdr_s *)CQE_ADDR(cq, cq->cq_head); in otx2_get_next_cqe()
60 cq->cq_head++; in otx2_get_next_cqe()
61 cq->cq_head &= (cq->cqe_cnt - 1); in otx2_get_next_cqe()
389 if (otx2_nix_cq_op_status(pfvf, cq) || !cq->pend_cqe) in otx2_rx_napi_handler()
402 cq->cq_head &= (cq->cqe_cnt - 1); in otx2_rx_napi_handler()
442 if (otx2_nix_cq_op_status(pfvf, cq) || !cq->pend_cqe) in otx2_tx_napi_handler()
[all …]

Completed in 75 milliseconds

12345678910>>...13